All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.springframework.block.ExceptionBlock Maven / Gradle / Ivy

The newest version!
package org.springframework.block;

public class ExceptionBlock extends AbstractBlock {
  public ExceptionBlock() {
    this(0);
  }

  public ExceptionBlock(long timeout) {
    super(timeout);
  }

  @Override
  public void eval() {
    try {
      Thread.sleep(1000);
    }
    catch (InterruptedException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    logger.info("TroubleMaker client: Exception requested.");
    throw new RuntimeException("Trouble Maker Runtime Exception");
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy