* have the created exception handler as a target.
*
* DONT'T FORGET TO CLOSE THE EXCEPTION HANDLER WITH exceptionHandlerEnd. */
public ProcessFactory exceptionHandler(Class<? extends Exception> exceptionClass) {
if (exceptionHandler!=null) {
throw new PvmException("exceptionHandler needs to be closed with exceptionHandlerEnd");
}
ProcessElementImpl processElement = null;
if (eventListenerReference!=null) {
processElement = eventListenerReference;
} else if (event!=null) {
processElement = event;
} else if (observableElement!=null) {
processElement = observableElement;
} else {
throw new PvmException("no current process element, event or action");
}
exceptionHandler = processElement.createExceptionHandler();
if (exceptionClass!=null) {