Package com.priint.pubserver.exception
Class ExceptionUtils
java.lang.Object
com.priint.pubserver.exception.ExceptionUtils
The type Exception utils.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intcreateErrorCode(int partnerNo, int moduleNo, int errorNo) Create error code int.static ErrorCodeManagerLocalGets error code manager.static voidlogMessage(Exception e, org.slf4j.Logger logger, Tracer tracer) Log message.static ConnectorExceptionnewConnectorException(Object caller, int errorCode, String... parameters) New connector exception connector exception.static ConnectorExceptionnewConnectorException(Object caller, int errorCode, Throwable cause, String... parameters) New connector exception connector exception.static DataSourceExceptionnewDataSourceException(Object caller, int errorCode, String... parameters) New data source exception data source exception.static DataSourceExceptionnewDataSourceException(Object caller, int errorCode, Throwable cause, String... parameters) New data source exception data source exception.static EntityManagerExceptionnewEntityManagerException(Object caller, int errorCode, String... parameters) New entity manager exception entity manager exception.static EntityManagerExceptionnewEntityManagerException(Object caller, int errorCode, Throwable cause, String... parameters) New entity manager exception entity manager exception.static NotImplementedExceptionnewNotImplementedException(Object caller, int errorCode, String... parameters) New not implemented exception not implemented exception.static NotImplementedExceptionnewNotImplementedException(Object caller, int errorCode, Throwable cause, String... parameters) New not implemented exception not implemented exception.static NullArgumentExceptionnewNullArgumentException(Object caller, int errorCode, String... parameters) New null argument exception null argument exception.static NullArgumentExceptionnewNullArgumentException(Object caller, int errorCode, Throwable cause, String... parameters) New null argument exception null argument exception.static PluginExceptionnewPluginException(Object caller, int errorCode, String... parameters) New plugin exception plugin exception.static PluginExceptionnewPluginException(Object caller, int errorCode, Throwable cause, String... parameters) New plugin exception plugin exception.static ErrorCodeInforeadErrorCodeInfo(int code, String language) Read error code info based on code and language.static StringreadErrorMessage(int code, String language, String... parameters) Read error message string.static List<ErrorStackInfo>retrieveExceptionsStack(Exception exception) Prepares list of ErrorStackInfo objects, this method returns all errors from error's stack.
-
Method Details
-
newDataSourceException
public static DataSourceException newDataSourceException(Object caller, int errorCode, String... parameters) New data source exception data source exception.- Parameters:
caller- the callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- 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 callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- 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 callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- 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 callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- 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 callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- 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 callererrorCode- the error codeparameters- 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 callererrorCode- the error codecause- the causeparameters- the parameters- Returns:
- the connector exception
-
logMessage
Log message.- Parameters:
e- the elogger- the loggertracer- the tracer
-
createErrorCode
public static int createErrorCode(int partnerNo, int moduleNo, int errorNo) Create error code int.- Parameters:
partnerNo- the partner nomoduleNo- the module noerrorNo- the error no- Returns:
- the int
-
getErrorCodeManager
Gets error code manager.- Returns:
- the error code manager
-
readErrorMessage
Read error message string.- Parameters:
code- the codelanguage- the languageparameters- the parameters- Returns:
- the string
-
readErrorCodeInfo
Read error code info based on code and language.- Parameters:
code- the codelanguage- the language- Returns:
- the error code info
-
retrieveExceptionsStack
Prepares list of ErrorStackInfo objects, this method returns all errors from error's stack.- Parameters:
exception- the exception- Returns:
- list
-