List of usage examples for org.apache.wicket.request.http.handler ErrorCodeRequestHandler ErrorCodeRequestHandler
public ErrorCodeRequestHandler(final int errorCode)
From source file:name.martingeisse.admin.application.wicket.ExceptionMapper.java
License:Open Source License
@Override public IRequestHandler map(final Exception e) { ParameterUtil.ensureNotNull(e, "e"); try {/* w w w .j a v a 2 s.c o m*/ final IRequestHandler result = internalMap(e); if (result == null) { // super.map will log the exception return super.map(e); } else { // log the exception here logger.error("Unexpected error occurred", e); return result; } } catch (final RuntimeException e2) { logger.error("nested exception in ExceptionMapper: " + e2.getMessage(), e2); return new ErrorCodeRequestHandler(500); } }