use of org.apache.tapestry5.services.ExceptionReporter in project tapestry-5 by apache.
the class DefaultRequestExceptionHandlerTest method setup_tests.
@BeforeMethod
public void setup_tests() throws Exception {
mockConfiguration.clear();
pageCache = mockRequestPageCache();
renderer = mockPageResponseRenderer();
logger = mockLogger();
request = mockRequest();
response = mockResponse();
componentClassResolver = mockComponentClassResolver();
linkSource = mockLinkSource();
serviceResources = mockServiceResources();
mockConfiguration.put(AccessControlException.class, MyPage.class);
mockConfiguration.put(MyContextAwareException.class, new ExceptionHandlerAssistant() {
public Object handleRequestException(Throwable exception, List<Object> exceptionContext) throws IOException {
return null;
}
});
ExceptionReporter noopExceptionReporter = new ExceptionReporter() {
@Override
public void reportException(Throwable exception) {
}
};
exceptionHandler = new DefaultRequestExceptionHandler(pageCache, renderer, logger, "exceptionpage", request, response, componentClassResolver, linkSource, serviceResources, noopExceptionReporter, false, mockConfiguration);
}
Aggregations