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");
}
}