com.whosly.disclosure.early.handler.ThrowErrorHandler Maven / Gradle / Ivy
package com.whosly.disclosure.early.handler;
import com.whosly.disclosure.early.handler.spi.ErrorHandler;
import com.whosly.disclosure.early.handler.spi.exception.SystemException;
/**
* error handler for throw SystemException .
*
* @author fengyang
* @date 2020-10-09 14:18
* @title: ThrowErrorHandler
*/
public class ThrowErrorHandler implements ErrorHandler {
@Override
public void handleException(final String jobName, final Throwable cause) {
throw new SystemException(cause);
}
@Override
public void handleMsg(String name, String message) {
throw new SystemException(message);
}
@Override
public String getType() {
return "THROW";
}
}