From e19d3485c7ea0eb1cd877d52009e6efc932ce246 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 11 Apr 2019 09:44:41 +0200 Subject: add some utils and new exceptions --- .../eaaf/core/exceptions/EAAFServiceException.java | 30 ++++++++++++++++++++++ .../exceptions/ProtocolResponseExceptions.java | 14 ++++++++++ 2 files changed, 44 insertions(+) create mode 100644 eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java create mode 100644 eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions') diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java new file mode 100644 index 00000000..309834a2 --- /dev/null +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/EAAFServiceException.java @@ -0,0 +1,30 @@ +package at.gv.egiz.eaaf.core.exceptions; + +import org.springframework.lang.NonNull; + +public abstract class EAAFServiceException extends EAAFException { + + private static final long serialVersionUID = -867758153828290337L; + + public EAAFServiceException(String errorId, Object[] params) { + super(errorId, params); + + } + + public EAAFServiceException(String errorId, Object[] params, Throwable e) { + super(errorId, params, e); + + } + + /** + * Get a textual identifier of the service that throws this exception + * + * @return + */ + @NonNull + protected abstract String getServiceIdentifier(); + + + + +} diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java new file mode 100644 index 00000000..194505d3 --- /dev/null +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/exceptions/ProtocolResponseExceptions.java @@ -0,0 +1,14 @@ +package at.gv.egiz.eaaf.core.exceptions; + +public class ProtocolResponseExceptions extends EAAFProtocolException { + + private static final long serialVersionUID = -7866198705324084601L; + + public ProtocolResponseExceptions(String internalMsgId, Object[] params) { + super(internalMsgId, params); + } + + public ProtocolResponseExceptions(String internalMsgId, Object[] params, Throwable e) { + super(internalMsgId, params, e); + } +} -- cgit v1.2.3