/******************************************************************************* *******************************************************************************/ package at.gv.egiz.eaaf.core.exceptions; import org.apache.commons.lang3.StringUtils; import at.gv.egiz.eaaf.core.api.IRequest; /** * @author tlenz * */ public class TaskExecutionException extends ProcessExecutionException { private static final long serialVersionUID = 1L; Throwable originalException = null; String pendingRequestID = null; /** * @param message * @param cause */ public TaskExecutionException(IRequest pendingReq, String message, Throwable cause) { super(message, cause); this.originalException = cause; if (StringUtils.isNotEmpty(pendingReq.getPendingRequestId())) this.pendingRequestID = pendingReq.getPendingRequestId(); } /** * Get the original internal exception from task * * @return the originalException */ public Throwable getOriginalException() { return originalException; } /** * Get the pending-request ID of that request, which was processed when the exception occurs * * @return the pendingRequestID */ public String getPendingRequestID() { return pendingRequestID; } }