IMC Epclient 5.0.3

at.spardat.enterprise.exc
Class AppException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byat.spardat.enterprise.exc.BaseException
                  extended byat.spardat.enterprise.exc.AppException
All Implemented Interfaces:
INotification, java.io.Serializable

public class AppException
extends BaseException

This class is used to throw application-level exceptions. Application-exceptions inform the outside world from abnormal application-level conditions, such as illegal arguments to business methods or illegal state of data a business method is operating on.

Application-exception are most often caused by the end-user (in online applications) who triggers business logic in a particular way that results in abnormal conditions.

Application-exceptions are not used to indicate system-level problems. For that purpose a separate class SysException may be used.

This class may be subclassed with the restriction, that only methods may be added in the subclass, not instance variables. The reason: This class is used in remote communications and arbitrarely subclassing would require the remote clients to be also able to load the subclasses.

Author:
YSD, 21.05.2003 19:29:23
See Also:
Serialized Form

Field Summary
 
Fields inherited from class at.spardat.enterprise.exc.BaseException
notification_, showToEndUser_
 
Fields inherited from interface at.spardat.enterprise.exc.INotification
R_ABORT, R_ABORT_RETRY_IGNORE, R_CANCEL, R_IGNORE, R_NO, R_OK, R_OK_CANCEL, R_RETRY, R_RETRY_CANCEL, R_YES, R_YES_NO, R_YES_NO_CANCEL, T_ERROR, T_INFORMATION, T_QUESTION, T_WARNING
 
Constructor Summary
AppException(java.lang.String message)
          Constructs and sets the message to the provided value.
AppException(java.lang.String messageFmt, java.lang.Object param1)
          Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.
AppException(java.lang.String messageFmt, java.lang.Object[] params)
          Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.
AppException(java.lang.String messageFmt, java.lang.Object param1, java.lang.Object param2)
          Constructs and sets the message of this from a two parameter java.text.MessageFormat compatible string.
AppException(java.lang.Throwable detail)
          Constructs with a detail exception and an empty message.
AppException(java.lang.Throwable detail, java.lang.String message)
          Constructs and sets the message and the detail exception to the provided value.
AppException(java.lang.Throwable detail, java.lang.String messageFmt, java.lang.Object param1)
          Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.
AppException(java.lang.Throwable detail, java.lang.String messageFmt, java.lang.Object[] params)
          Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.
AppException(java.lang.Throwable detail, java.lang.String messageFmt, java.lang.Object param1, java.lang.Object param2)
          Constructs and sets the message of this from a two parameter java.text.MessageFormat compatible string.
 
Method Summary
 AppException setCode(int code)
          Sets the code.
 AppException setReaction(int reaction)
          Sets one or a bit-or combination of the reaction constants of INotification.
 AppException setShortMessage(java.lang.String shortMessage)
          Sets the short message.
 AppException setShowToEndUser(boolean what)
          Sets if this exception may be directly displayed to the end user or not.
 AppException setType(int type)
          Sets the type which may be one of the T_-constants in INotification.
 
Methods inherited from class at.spardat.enterprise.exc.BaseException
containsCode, getCode, getDetail, getFirstNonEmptyMessage, getMessage, getMessage, getOwnStackTrace, getReaction, getShortMessage, getStackOfThis, getType, prepareMigration, printStackTrace, printStackTrace, printStackTrace, setMessage, setMessage, setMessage, showToEndUser, toString, truncateSubclasses
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AppException

public AppException(java.lang.String messageFmt,
                    java.lang.Object[] params)
Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt - format string as defined in java.text.MessageFormat.
params - the message parameters

AppException

public AppException(java.lang.String messageFmt,
                    java.lang.Object param1,
                    java.lang.Object param2)
Constructs and sets the message of this from a two parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt - format string as defined in java.text.MessageFormat.
param1 - first message parameter
param2 - second message parameter

AppException

public AppException(java.lang.String messageFmt,
                    java.lang.Object param1)
Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
messageFmt - format string as defined in java.text.MessageFormat.
param1 - message parameter

AppException

public AppException(java.lang.String message)
Constructs and sets the message to the provided value.

Parameters:
message - text to set

AppException

public AppException(java.lang.Throwable detail,
                    java.lang.String message)
Constructs and sets the message and the detail exception to the provided value.

Parameters:
detail - the detail throwable to set.
message - text to set

AppException

public AppException(java.lang.Throwable detail)
Constructs with a detail exception and an empty message.

Parameters:
detail - the detail throwable to set.

AppException

public AppException(java.lang.Throwable detail,
                    java.lang.String messageFmt,
                    java.lang.Object[] params)
Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
detail - detail throwable.
messageFmt - format string as defined in java.text.MessageFormat.
params - the message parameters

AppException

public AppException(java.lang.Throwable detail,
                    java.lang.String messageFmt,
                    java.lang.Object param1,
                    java.lang.Object param2)
Constructs and sets the message of this from a two parameter java.text.MessageFormat compatible string.

Parameters:
detail - the detail throwable.
messageFmt - format string as defined in java.text.MessageFormat.
param1 - first message parameter
param2 - second message parameter

AppException

public AppException(java.lang.Throwable detail,
                    java.lang.String messageFmt,
                    java.lang.Object param1)
Constructs and sets the message of this from a one parameter java.text.MessageFormat compatible string.

Parameters:
detail - detail throwable.
messageFmt - format string as defined in java.text.MessageFormat.
param1 - message parameter
Method Detail

setCode

public AppException setCode(int code)
Sets the code. The code should be used to discrimitate among different kinds of exceptions/notifications.

See Also:
INotification

setReaction

public AppException setReaction(int reaction)
Sets one or a bit-or combination of the reaction constants of INotification.

Returns:
this
See Also:
INotification.getReaction()

setShortMessage

public AppException setShortMessage(java.lang.String shortMessage)
Sets the short message.

See Also:
INotification.getShortMessage()

setType

public AppException setType(int type)
Sets the type which may be one of the T_-constants in INotification.

Returns:
this
See Also:
INotification.getType()

setShowToEndUser

public AppException setShowToEndUser(boolean what)
Sets if this exception may be directly displayed to the end user or not. If not called, this property defaults to true.


IMC Epclient 5.0.3