public boolean matches(Throwable exception) { return exceptionClassName != null ? getExceptionClass().isInstance(exception) : true; }
protected ExceptionHandler findExceptionHandler(Throwable exception) { if (exceptionHandlers != null) { for (Iterator iter = exceptionHandlers.iterator(); iter.hasNext();) { ExceptionHandler candidate = (ExceptionHandler) iter.next(); if (candidate.matches(exception)) return candidate; } } return null; }
protected void readExceptionHandler(Element exceptionHandlerElement, GraphElement graphElement) { // create the exception handler ExceptionHandler exceptionHandler = new ExceptionHandler(); exceptionHandler.setExceptionClassName(exceptionHandlerElement.attributeValue("exception-class")); // add it to the graph element graphElement.addExceptionHandler(exceptionHandler); // read the actions in the body of the exception-handler element for (Iterator iter = exceptionHandlerElement.elementIterator(); iter.hasNext();) { Element childElement = (Element) iter.next(); if (ActionTypes.hasActionName(childElement.getName())) { Action action = createAction(childElement); exceptionHandler.addAction(action); } } }
exceptionHandler.handleException(this, executionContext); return;
protected void readExceptionHandler(Element exceptionHandlerElement, GraphElement graphElement) { // create the exception handler ExceptionHandler exceptionHandler = new ExceptionHandler(); exceptionHandler.setExceptionClassName(exceptionHandlerElement.attributeValue("exception-class")); // add it to the graph element graphElement.addExceptionHandler(exceptionHandler); // read the actions in the body of the exception-handler element for (Iterator iter = exceptionHandlerElement.elementIterator(); iter.hasNext();) { Element childElement = (Element) iter.next(); if (ActionTypes.hasActionName(childElement.getName())) { Action action = createAction(childElement); exceptionHandler.addAction(action); } } }
exceptionHandler.handleException(this, executionContext); return;
protected ExceptionHandler findExceptionHandler(Throwable exception) { if (exceptionHandlers != null) { for (Iterator iter = exceptionHandlers.iterator(); iter.hasNext();) { ExceptionHandler candidate = (ExceptionHandler) iter.next(); if (candidate.matches(exception)) return candidate; } } return null; }
public boolean matches(Throwable exception) { return exceptionClassName != null ? getExceptionClass().isInstance(exception) : true; }