Package com.priint.pubserver.exception
Class PubServerException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.priint.pubserver.exception.PubServerException
-
- All Implemented Interfaces:
java.io.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,ServiceException,SessionManagerException,SessionNotAuthenticated,TableUtils.TableUtilsException,ValidationFailedException,XMLException
public abstract class PubServerException extends java.lang.Exception implements java.io.SerializableAbstract 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
PubServerRolledbackExceptioninstead.- Since:
- 4.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PubServerException()PubServerException(java.lang.Object caller, int errorCode, java.lang.String message, java.lang.Throwable cause, java.lang.String... parameters)Create a basic publishing server exception.PubServerException(java.lang.String message, java.lang.Throwable cause, int errorCode, java.lang.Object caller)Instantiates a new Pub server exception with no parameters.PubServerException(java.lang.String message, java.lang.Throwable cause, int errorCode, java.lang.Object caller, java.lang.String... parameters)Instantiates a new Pub server exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCode()Get error code.ErrorCodeInfogetErrorCodeInfo()This methods returns ErrorCodeInfo object.java.util.List<ErrorStackInfo>getErrorsStack()This method returns list of ErrorStackInfo, the list is not filled automatically.java.util.List<java.lang.Throwable>getExceptionsStack(java.lang.Throwable exception)Returns list of exceptions from exceptions stackjava.lang.StringgetFormattedMessage()Returns a formatted exception message for the exception.java.lang.StringgetFormattedMessageTrace()Returns a formatted exception message for the exception and all causes.java.util.List<java.lang.String>getMessageStack()Returns a List of Exception Messages following the cause chain to the initial exception and message from current exceptionjava.lang.StringgetModule()Get module name that created this exception.java.lang.String[]getParameters()Get parameters string [ ] array.voidretrieveErrorCodeInfo()Sets errorCodeInfo objectvoidretrieveErrorsStack()Sets errorsStack list
-
-
-
Constructor Detail
-
PubServerException
public PubServerException()
-
PubServerException
public PubServerException(java.lang.Object caller, int errorCode, java.lang.String message, java.lang.Throwable cause, java.lang.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
public PubServerException(java.lang.String message, java.lang.Throwable cause, int errorCode, java.lang.Object caller)Instantiates a new Pub server exception with no parameters.- Parameters:
message- the messagecause- the causeerrorCode- the error codecaller- the caller
-
PubServerException
public PubServerException(java.lang.String message, java.lang.Throwable cause, int errorCode, java.lang.Object caller, java.lang.String... parameters)Instantiates a new Pub server exception.- Parameters:
message- the messagecause- the causeerrorCode- the error codecaller- the callerparameters- the parameters
-
-
Method Detail
-
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
public final java.lang.String getModule()
Get module name that created this exception. Name will be derived from caller argument of the exception constructor.- Returns:
- module name
-
getFormattedMessage
public final java.lang.String getFormattedMessage()
Returns a formatted exception message for the exception. Like:MyPlugin:00201
Third Exception [hashCode=452800031] - Returns:
- formatted exception message
-
getFormattedMessageTrace
public final java.lang.String getFormattedMessageTrace()
Returns a formatted exception message for the exception and all causes. Like:[1] MyPlugin1:00201
Third Exception [hashCode=452800031] [2] Exception:00000 Second Exception [3] MyPlugin2:00200 First Exception [hashCode=452800031] - Returns:
- formatted exception message
-
getMessageStack
public final java.util.List<java.lang.String> getMessageStack()
Returns a List of Exception Messages following the cause chain to the initial exception and message from current exception- Returns:
- message list
-
getExceptionsStack
public java.util.List<java.lang.Throwable> getExceptionsStack(java.lang.Throwable exception)
Returns list of exceptions from exceptions stack- Parameters:
exception- from which we want to get stack of exceptions- Returns:
- list of Throwable objects
-
getErrorsStack
public java.util.List<ErrorStackInfo> 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
public ErrorCodeInfo 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
public java.lang.String[] getParameters()
Get parameters string [ ] array.- Returns:
- the string [ ]
-
-