Class ServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.priint.pubserver.exception.PubServerException
com.priint.pubserver.entitydata.service.ServiceException
- All Implemented Interfaces:
Serializable
public class ServiceException
extends com.priint.pubserver.exception.PubServerException
Represents an exception that occurs when a service method fails and there is no expected remedy.
This exception is used to signal non-recoverable errors encountered in the service layer.
It extends PubServerException and supports passing a message, cause, error code, and caller context.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionServiceException(String message, Throwable cause) Constructs a newServiceExceptionwith the specified message and cause.ServiceException(String message, Throwable cause, int errorCode, Object caller) Constructs a newServiceExceptionwith the specified message, cause, error code, and caller. -
Method Summary
Methods inherited from class com.priint.pubserver.exception.PubServerException
getCode, getErrorCodeInfo, getErrorsStack, getExceptionsStack, getFormattedMessage, getFormattedMessageTrace, getMessageStack, getModule, getParameters, retrieveErrorCodeInfo, retrieveErrorsStackMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ServiceException
Constructs a newServiceExceptionwith the specified message, cause, error code, and caller.- Parameters:
message- the detail message describing the error.cause- the underlying cause of the exception (can benull).errorCode- the error code associated with the exception.caller- the object or class where the exception originated (can benull).
-
ServiceException
Constructs a newServiceExceptionwith the specified message and cause.The error code is set to 0 and caller is set to
null.- Parameters:
message- the detail message describing the error.cause- the underlying cause of the exception (can benull).
-