Package com.priint.pubserver.exception
Class PubServerException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.priint.pubserver.exception.PubServerException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthManagerException,CometException,ConfigManagerCheckinException,ConfigManagerCheckoutException,ConfigManagerDeleteException,ConfigManagerException,ConfigManagerFileIsAlreadyLocked,ConfigManagerMergeException,ConfigManagerValidateException,ConnectorException,DataProviderException,DataSourceException,DeploymentManagerException,DocumentLockManagerException,DocumentManagerException,EntityManagerException,ErrorCodeNotFoundException,ExecutionException,FileIOException,InvalidArgumentException,InvalidResultTypeException,InvalidSessionException,MediaAssetManagerException,NotDeployedException,NotImplementedException,ParameterInterpreterException,PluginException,PubServerRolledbackException,ResourceNotFoundException,ServerException,ServerException,ServiceException,SessionManagerException,SessionNotAuthenticated,TableUtils.TableUtilsException,ValidationFailedException,XMLException
Abstract base exception for all public exceptions in publishing server.
This is a checked exception (Application Exception). It does NOT force a transaction rollback of the EJB container.
If you DO want to force a rollback of the current transaction use the PubServerRolledbackException instead.
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPubServerException(Object caller, int errorCode, String message, Throwable cause, String... parameters) Create a basic publishing server exception.PubServerException(String message, Throwable cause, int errorCode, Object caller) Instantiates a new Pub server exception with no parameters.PubServerException(String message, Throwable cause, int errorCode, Object caller, String... parameters) Instantiates a new Pub server exception. -
Method Summary
Modifier and TypeMethodDescriptionfinal intgetCode()Get error code.This methods returns ErrorCodeInfo object.This method returns list of ErrorStackInfo, the list is not filled automatically.getExceptionsStack(Throwable exception) Returns list of exceptions from exceptions stackfinal StringReturns a formatted exception message for the exception.final StringReturns a formatted exception message for the exception and all causes.Returns a List of Exception Messages following the cause chain to the initial exception and message from current exceptionfinal StringGet module name that created this exception.String[]Get parameters string [ ] array.voidSets errorCodeInfo objectvoidSets errorsStack listMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
PubServerException
public PubServerException() -
PubServerException
public PubServerException(Object caller, int errorCode, String message, Throwable cause, String... parameters) Create a basic publishing server exception.- Parameters:
message- short textual error message, possibly containing some identifying object datacause- (optional) original exception leading to this one ornullerrorCode- some error specific code for support or0. Error codes should be defined as public constants in the exception class derived fromPubServerException.caller- Object that creates this exception. Object class name will be used as name of the module that created this exception. If caller is of type String the string itself will be used as module name (long strings might be truncated).parameters- the parameters
-
PubServerException
Instantiates a new Pub server exception with no parameters.- Parameters:
message- the messagecause- the causeerrorCode- the error codecaller- the caller
-
PubServerException
public PubServerException(String message, Throwable cause, int errorCode, Object caller, String... parameters) Instantiates a new Pub server exception.- Parameters:
message- the messagecause- the causeerrorCode- the error codecaller- the callerparameters- the parameters
-
-
Method Details
-
getCode
public final int getCode()Get error code. Error codes should be defined as public constants in the exception class derived fromPubServerException.- Returns:
- code as integer.
-
getModule
Get module name that created this exception. Name will be derived from caller argument of the exception constructor.- Returns:
- module name
-
getFormattedMessage
Returns a formatted exception message for the exception. Like:MyPlugin:00201
Third Exception [hashCode=452800031] - Returns:
- formatted exception message
-
getFormattedMessageTrace
Returns a formatted exception message for the exception and all causes. Like:[1] MyPlugin1:00201
Third Exception [hashCode=452800031] [2] Exception:00000 <java.lang.Exception> Second Exception [3] MyPlugin2:00200 First Exception [hashCode=452800031] - Returns:
- formatted exception message
-
getMessageStack
Returns a List of Exception Messages following the cause chain to the initial exception and message from current exception- Returns:
- message list
-
getExceptionsStack
Returns list of exceptions from exceptions stack- Parameters:
exception- from which we want to get stack of exceptions- Returns:
- list of Throwable objects
-
getErrorsStack
This method returns list of ErrorStackInfo, the list is not filled automatically. To fill this list you need to call setErrorsStack() method manually.- Returns:
-
retrieveErrorsStack
public void retrieveErrorsStack()Sets errorsStack list -
getErrorCodeInfo
This methods returns ErrorCodeInfo object. This object is not filled automatically. To set this object you must call setErrorCodeInfo();- Returns:
-
retrieveErrorCodeInfo
public void retrieveErrorCodeInfo()Sets errorCodeInfo object -
getParameters
Get parameters string [ ] array.- Returns:
- the string [ ]
-