use of com.enonic.xp.portal.impl.mapper.PortalErrorMapper in project xp by enonic.
the class ErrorHandlerScriptImpl method doExecute.
private PortalResponse doExecute(final PortalError portalError, final String handlerMethod) {
Tracer.withCurrent(this::addTraceInfo);
final PortalErrorMapper portalErrorMapper = new PortalErrorMapper(portalError);
final ScriptValue result = this.scriptExports.executeMethod(handlerMethod, portalErrorMapper);
if ((result == null) || !result.isObject()) {
return null;
} else {
return new PortalResponseSerializer(result, portalError.getStatus()).defaultPostProcess(false).applyFilters(false).serialize();
}
}
Aggregations