You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

17 lines
510 B

package com.crawler.exception.handler;
import com.crawler.exception.CrawlerException;
import com.crawler.exception.ExceptionHandler;
import com.crawler.view.CrawlerView;
public class CrawlerExceptionHandler implements ExceptionHandler {
@Override
public void handle(Exception e, CrawlerView view) {
view.showErrorMessage("爬虫异常: " + e.getMessage());
}
@Override
public Class<? extends Exception> getSupportedExceptionType() {
return CrawlerException.class;
}
}