Class ExceptionUtils

java.lang.Object
com.priint.pubserver.exception.ExceptionUtils

public class ExceptionUtils extends Object
The type Exception utils.
  • Method Details

    • newDataSourceException

      public static DataSourceException newDataSourceException(Object caller, int errorCode, String... parameters)
      New data source exception data source exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the data source exception
    • newDataSourceException

      public static DataSourceException newDataSourceException(Object caller, int errorCode, Throwable cause, String... parameters)
      New data source exception data source exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the data source exception
    • newNotImplementedException

      public static NotImplementedException newNotImplementedException(Object caller, int errorCode, String... parameters)
      New not implemented exception not implemented exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the not implemented exception
    • newNotImplementedException

      public static NotImplementedException newNotImplementedException(Object caller, int errorCode, Throwable cause, String... parameters)
      New not implemented exception not implemented exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the not implemented exception
    • newNullArgumentException

      public static NullArgumentException newNullArgumentException(Object caller, int errorCode, String... parameters)
      New null argument exception null argument exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the null argument exception
    • newNullArgumentException

      public static NullArgumentException newNullArgumentException(Object caller, int errorCode, Throwable cause, String... parameters)
      New null argument exception null argument exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the null argument exception
    • newPluginException

      public static PluginException newPluginException(Object caller, int errorCode, String... parameters)
      New plugin exception plugin exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the plugin exception
    • newPluginException

      public static PluginException newPluginException(Object caller, int errorCode, Throwable cause, String... parameters)
      New plugin exception plugin exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the plugin exception
    • newEntityManagerException

      public static EntityManagerException newEntityManagerException(Object caller, int errorCode, String... parameters)
      New entity manager exception entity manager exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the entity manager exception
    • newEntityManagerException

      public static EntityManagerException newEntityManagerException(Object caller, int errorCode, Throwable cause, String... parameters)
      New entity manager exception entity manager exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the entity manager exception
    • newConnectorException

      public static ConnectorException newConnectorException(Object caller, int errorCode, String... parameters)
      New connector exception connector exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      parameters - the parameters
      Returns:
      the connector exception
    • newConnectorException

      public static ConnectorException newConnectorException(Object caller, int errorCode, Throwable cause, String... parameters)
      New connector exception connector exception.
      Parameters:
      caller - the caller
      errorCode - the error code
      cause - the cause
      parameters - the parameters
      Returns:
      the connector exception
    • logMessage

      public static void logMessage(Exception e, org.slf4j.Logger logger, Tracer tracer)
      Log message.
      Parameters:
      e - the e
      logger - the logger
      tracer - the tracer
    • createErrorCode

      public static int createErrorCode(int partnerNo, int moduleNo, int errorNo)
      Create error code int.
      Parameters:
      partnerNo - the partner no
      moduleNo - the module no
      errorNo - the error no
      Returns:
      the int
    • getErrorCodeManager

      public static ErrorCodeManagerLocal getErrorCodeManager()
      Gets error code manager.
      Returns:
      the error code manager
    • readErrorMessage

      public static String readErrorMessage(int code, String language, String... parameters)
      Read error message string.
      Parameters:
      code - the code
      language - the language
      parameters - the parameters
      Returns:
      the string
    • readErrorCodeInfo

      public static ErrorCodeInfo readErrorCodeInfo(int code, String language)
      Read error code info based on code and language.
      Parameters:
      code - the code
      language - the language
      Returns:
      the error code info
    • retrieveExceptionsStack

      public static List<ErrorStackInfo> retrieveExceptionsStack(Exception exception)
      Prepares list of ErrorStackInfo objects, this method returns all errors from error's stack.
      Parameters:
      exception - the exception
      Returns:
      list