Class ServiceException

  • All Implemented Interfaces:
    java.io.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:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      ServiceException​(java.lang.String message, java.lang.Throwable cause)
      Constructs a new ServiceException with the specified message and cause.
      ServiceException​(java.lang.String message, java.lang.Throwable cause, int errorCode, java.lang.Object caller)
      Constructs a new ServiceException with 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, retrieveErrorsStack
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ServiceException

        public ServiceException​(java.lang.String message,
                                java.lang.Throwable cause,
                                int errorCode,
                                java.lang.Object caller)
        Constructs a new ServiceException with the specified message, cause, error code, and caller.
        Parameters:
        message - the detail message describing the error.
        cause - the underlying cause of the exception (can be null).
        errorCode - the error code associated with the exception.
        caller - the object or class where the exception originated (can be null).
      • ServiceException

        public ServiceException​(java.lang.String message,
                                java.lang.Throwable cause)
        Constructs a new ServiceException with 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 be null).