private void handleException(Throwable cause, String service, String interfaceImplementationRef, String operation, String paramType, Object param) { logger.debug("Handling exception {} inside service {} or {} and operation {} with param type {} and value {}", cause.getMessage(), service, operation, paramType, param); WorkItemHandlerRuntimeException wihRe; if( cause instanceof InvocationTargetException ) { Throwable realCause = cause.getCause(); wihRe = new WorkItemHandlerRuntimeException(realCause); wihRe.setStackTrace(realCause.getStackTrace()); } else { wihRe = new WorkItemHandlerRuntimeException(cause); wihRe.setStackTrace(cause.getStackTrace()); } wihRe.setInformation("Interface", service); wihRe.setInformation("InterfaceImplementationRef", interfaceImplementationRef); wihRe.setInformation("Operation", operation); wihRe.setInformation("ParameterType", paramType); wihRe.setInformation("Parameter", param); wihRe.setInformation(WorkItemHandlerRuntimeException.WORKITEMHANDLERTYPE, this.getClass().getSimpleName()); throw wihRe; }
private void handleException(Throwable cause, String service, String interfaceImplementationRef, String operation, String paramType, Object param) { logger.debug("Handling exception {} inside service {} or {} and operation {} with param type {} and value {}", cause.getMessage(), service, operation, paramType, param); WorkItemHandlerRuntimeException wihRe; if( cause instanceof InvocationTargetException ) { Throwable realCause = cause.getCause(); wihRe = new WorkItemHandlerRuntimeException(realCause); wihRe.setStackTrace(realCause.getStackTrace()); } else { wihRe = new WorkItemHandlerRuntimeException(cause); wihRe.setStackTrace(cause.getStackTrace()); } wihRe.setInformation("Interface", service); wihRe.setInformation("InterfaceImplementationRef", interfaceImplementationRef); wihRe.setInformation("Operation", operation); wihRe.setInformation("ParameterType", paramType); wihRe.setInformation("Parameter", param); wihRe.setInformation(WorkItemHandlerRuntimeException.WORKITEMHANDLERTYPE, this.getClass().getSimpleName()); throw wihRe; }
wihre.setStackTrace(cause.getStackTrace()); wihre.setInformation(SERVICE_NAME, serviceName != null ? serviceName.toString() : null); wihre.setInformation(OPERATION_NAME, operationName);
wihre.setStackTrace(cause.getStackTrace()); wihre.setInformation(SERVICE_NAME, serviceName != null ? serviceName.toString() : null); wihre.setInformation(OPERATION_NAME, operationName);