Class ServiceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- africa.absa.inception.core.service.ServiceException
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
InvalidArgumentException,ServiceUnavailableException
public abstract class ServiceException extends Exception
The ServiceException exception is the base class that all service exceptions should be derived from.- Author:
- Marcus Portmann
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ServiceException(String message)Constructs a new ServiceException with the specified message.ServiceException(String message, Throwable cause)Constructs a new ServiceException with the specified message and cause.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ServiceErrorgetFaultInfo()Returns the fault info.LocalDateTimegetTimestamp()Returns the date and time the service exception occurred.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
ServiceException
public ServiceException(String message)
Constructs a new ServiceException with the specified message.- Parameters:
message- The message saved for later retrieval by the getMessage() method.
-
ServiceException
public ServiceException(String message, Throwable cause)
Constructs a new ServiceException with the specified message and cause.- Parameters:
message- The message saved for later retrieval by the getMessage() method.cause- The cause saved for later retrieval by the getCause() method. (A null value is permitted if the cause is nonexistent or unknown)
-
-
Method Detail
-
getFaultInfo
public ServiceError getFaultInfo()
Returns the fault info.- Returns:
- the fault info
-
getTimestamp
public LocalDateTime getTimestamp()
Returns the date and time the service exception occurred.- Returns:
- the date and time the service exception occurred
-
-