Search in sources :

Example 1 with ErrorHandlerHelper

use of com.alibaba.citrus.webx.util.ErrorHandlerHelper in project otter by alibaba.

the class PrepareExceptionValve method invoke.

@Override
public void invoke(PipelineContext pipelineContext) throws Exception {
    //
    clearBuffer(response);
    Exception e = (Exception) pipelineContext.getAttribute("exception");
    log.error(e.getMessage(), e);
    Throwable cause = e.getCause();
    if (cause != null && cause instanceof ArbitrateException) {
        e = (ArbitrateException) cause;
    }
    ErrorHandlerHelper errorHandlerHelper = ErrorHandlerHelper.getInstance(request);
    errorHandlerHelper.setException(e);
    pipelineContext.invokeNext();
}
Also used : ArbitrateException(com.alibaba.otter.shared.arbitrate.exception.ArbitrateException) ErrorHandlerHelper(com.alibaba.citrus.webx.util.ErrorHandlerHelper) ArbitrateException(com.alibaba.otter.shared.arbitrate.exception.ArbitrateException)

Aggregations

ErrorHandlerHelper (com.alibaba.citrus.webx.util.ErrorHandlerHelper)1 ArbitrateException (com.alibaba.otter.shared.arbitrate.exception.ArbitrateException)1