📄 interruptprocessingrobotexceptionhandler.java
字号:
package net.matuschek.spider;
import java.net.URL;
/**
* InterruptProcessingRobotExceptionHandler
* This is a concrete ExceptionHandler, which interupts the processing robot
* by throwing a runtime exception.
* <p>
* @author cn
* @version 0.1
*/
public class InterruptProcessingRobotExceptionHandler implements RobotExceptionHandler {
/**
* This exception handler throws a runtime exception with the message of the
* incoming exception.
* @see RobotExceptionHandler#handleException(WebRobot, URL, Exception)
*/
public void handleException(WebRobot robot, URL url, Exception e) {
String errorMessage = e.getMessage();
//System.out.println("ERROR: " + errorMessage);
//robot.stopRobot();
throw new RuntimeException(errorMessage);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -