org.eclipse.stardust.common.error
Class ApplicationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.eclipse.stardust.common.error.ApplicationException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InternalException, PublicException

public abstract class ApplicationException
extends RuntimeException

Generic base exception.

Author:
mgille
See Also:
Serialized Form

Constructor Summary
ApplicationException(ErrorCase error, String message)
          Constructs the Exception
ApplicationException(ErrorCase error, String message, Throwable e)
          Constructs the Exception
ApplicationException(String message)
          Constructs the Exception
ApplicationException(String message, Throwable e)
          Constructs the Exception
ApplicationException(Throwable e)
          Constructs the Exception
 
Method Summary
 ErrorCase getError()
          Gets the ErrorCase for this exception
 List getInner()
          Gets the stack trace for the root exception or an empty list if no root cause exception was supplied in the constructor
 String getLocalizedMessage()
           
 boolean isLogged()
          Returns if this exception was already logged
 void setLogged(boolean logged)
          Set if this exception was already logged, If set to true, the logging framework will not log this exception anymore
 void setResourceBundle(ResourceBundle resourceBundle)
          Sets the Resource Bundle for localizing the error message.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApplicationException

public ApplicationException(String message)
Constructs the Exception

Parameters:
message - - the error message for this exception

ApplicationException

public ApplicationException(ErrorCase error,
                            String message)
Constructs the Exception

Parameters:
message - - the error message for this exception
error - - the ErrorCase for this message

ApplicationException

public ApplicationException(Throwable e)
Constructs the Exception

Parameters:
e - - the root cause for this exception

ApplicationException

public ApplicationException(String message,
                            Throwable e)
Constructs the Exception

Parameters:
message - - the error message for this exception
e - - the root cause for this exception

ApplicationException

public ApplicationException(ErrorCase error,
                            String message,
                            Throwable e)
Constructs the Exception

Parameters:
error - - the ErrorCase for this message
message - - the error message for this exception,
e - - the root cause for this exception
Method Detail

getError

public ErrorCase getError()
Gets the ErrorCase for this exception

Returns:
the ErrorCase set for this exception

getInner

public List getInner()
Gets the stack trace for the root exception or an empty list if no root cause exception was supplied in the constructor

Returns:
the stack trace for the root exception or an empty list if no root cause exception was supplied in the constructor

isLogged

public boolean isLogged()
Returns if this exception was already logged

Returns:
true if this exception was already logged, false otherwise

setLogged

public void setLogged(boolean logged)
Set if this exception was already logged, If set to true, the logging framework will not log this exception anymore

Parameters:
logged - - if this exception was already logged

setResourceBundle

public void setResourceBundle(ResourceBundle resourceBundle)
Sets the Resource Bundle for localizing the error message. Localization will be performed base on the id of the ErrorCase set for this exception

Parameters:
resourceBundle -

getLocalizedMessage

public String getLocalizedMessage()
Overrides:
getLocalizedMessage in class Throwable


Copyright © 2017 Eclipse Stardust. All Rights Reserved.