From bee5dd259a4438d45ecd1bcc26dfba12875236d6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 26 Jun 2018 11:03:48 +0200 Subject: initial commit --- .../core/exceptions/TaskExecutionException.java | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java new file mode 100644 index 00000000..b6c6bd16 --- /dev/null +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/TaskExecutionException.java @@ -0,0 +1,55 @@ +/******************************************************************************* + *******************************************************************************/ +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; + } + + + + + +} -- cgit v1.2.3