fr.esrf.tangoatk.core
Class ATKException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by fr.esrf.tangoatk.core.ATKException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AttributeReadException, AttributeSetException, CommandExecuteException, ConnectionException, DeviceException

public class ATKException
extends java.lang.Exception

A base class to handle error in ATK.

See Also:
Serialized Form

Field Summary
static int ERROR
           
static int PANIC
           
static java.lang.String[] severity
           
static int WARNING
           
 
Constructor Summary
ATKException()
          Constructs an empty ATK exception.
ATKException(fr.esrf.Tango.DevFailed e)
          Constructs an ATK exception from a Tango DevFailed exception.
ATKException(java.lang.Exception e)
           
ATKException(java.lang.String s)
          Constructs an ATK exception containing a single message.
 
Method Summary
 java.lang.String getDescription()
          Returns the description at the top level of the stack or the message if no stack is present.
 java.lang.String getDescription(int i)
          Returns the description at the specified level of the stack.
 fr.esrf.Tango.DevError[] getErrors()
          Returns the error stack.
 java.lang.String getMessage()
          Returns the Exception message.
 java.lang.String getOrigin()
          Returns the origin at the top level of the stack.
 java.lang.String getOrigin(int i)
          Returns the origin at the specified level of the stack.
 java.lang.String getReason()
          Returns the reason at the top level of the stack.
 java.lang.String getReason(int i)
          Returns the reason at the specified level of the stack.
 int getSeverity()
          Returns the severity of this exception.
 int getSeverity(int i)
          Gets the sevrity at the given stack level of this exception.
 java.lang.String getSourceName()
          Get the class name of the source exception.
 int getStackLength()
          Returns the tango stack length.
 java.lang.String getVersion()
           
 void setError(fr.esrf.Tango.DevFailed e)
          Apply the given Tango DevFailed exception to this exception.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

severity

public static java.lang.String[] severity

WARNING

public static final int WARNING
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

PANIC

public static final int PANIC
See Also:
Constant Field Values
Constructor Detail

ATKException

public ATKException()
Constructs an empty ATK exception.


ATKException

public ATKException(java.lang.String s)
Constructs an ATK exception containing a single message.

Parameters:
s - Exception message.

ATKException

public ATKException(fr.esrf.Tango.DevFailed e)
Constructs an ATK exception from a Tango DevFailed exception.

Parameters:
e - Tango exception

ATKException

public ATKException(java.lang.Exception e)
Method Detail

setError

public void setError(fr.esrf.Tango.DevFailed e)
Apply the given Tango DevFailed exception to this exception.

Parameters:
e - Tango exception

getErrors

public fr.esrf.Tango.DevError[] getErrors()
Returns the error stack.


getMessage

public java.lang.String getMessage()
Returns the Exception message. (Not from the stack)

Overrides:
getMessage in class java.lang.Throwable

getSeverity

public int getSeverity()
Returns the severity of this exception.


getSeverity

public int getSeverity(int i)
Gets the sevrity at the given stack level of this exception.

Parameters:
i - Stack level
See Also:
WARNING, ERROR, PANIC

getDescription

public java.lang.String getDescription()
Returns the description at the top level of the stack or the message if no stack is present.


getDescription

public java.lang.String getDescription(int i)
Returns the description at the specified level of the stack.

Parameters:
i - Stack level

getOrigin

public java.lang.String getOrigin()
Returns the origin at the top level of the stack.


getOrigin

public java.lang.String getOrigin(int i)
Returns the origin at the specified level of the stack.

Parameters:
i - Stack level

getReason

public java.lang.String getReason()
Returns the reason at the top level of the stack.


getReason

public java.lang.String getReason(int i)
Returns the reason at the specified level of the stack.

Parameters:
i - Stack level

getStackLength

public int getStackLength()
Returns the tango stack length.


getSourceName

public java.lang.String getSourceName()
Get the class name of the source exception.

Returns:
Class name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable

getVersion

public java.lang.String getVersion()