Class ServiceException

All Implemented Interfaces:
Serializable

public class ServiceException extends AppException
Exception class that can be used in services to indicate that the processing failed.
Since:
5.0
Author:
O. Kerpershoek
See Also:
  • Constructor Details

    • ServiceException

      public ServiceException(String serviceName, String message)
    • ServiceException

      public ServiceException(String serviceName, IMultilingualText message)
      Constructs a service exception for a service with a text object explaining the cause of the error.
      Parameters:
      serviceName - The name of the service where the error occurred.
      message - Text object containing additional information about the cause of the error.
    • ServiceException

      public ServiceException(String serviceName, IMultilingualText message, Throwable error)
      Constructs a service exception for a service with a text object and a throwable explaining the cause of the error.
      Parameters:
      serviceName - The name of the service where the error occurred.
      message - Text object containing additional information about the cause of the error.
      error - The original exception (may be null).
  • Method Details

    • getServiceName

      public String getServiceName()
      This method returns the name of the service that generated the exception.
      Returns:
      the name of the service that generated the exception.
    • getErrorMessage

      public IMultilingualText getErrorMessage()
      This method returns the multilingual error message of the exception.
      Returns:
      the multilingual error message of the exception.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable