Jwma

dtw.webmail.model
Class JwmaException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--dtw.webmail.model.JwmaException
All Implemented Interfaces:
JwmaError, java.io.Serializable

public class JwmaException
extends java.lang.Exception
implements JwmaError

Class implementing the JwmaError model. It can contain an embedded exception and allows access to it and it's corresponding stack trace.

Version:
0.9.7 07/02/2003
Author:
Dieter Wimberger
See Also:
Serialized Form

Constructor Summary
JwmaException(java.lang.String msg)
          Constructs a new JwmaException instance with a given description.
JwmaException(java.lang.String msg, boolean inlined)
          Constructs a new JwmaException instance.
 
Method Summary
 void addDescription(java.lang.String description)
           
 java.lang.String[] getDescriptions()
          Returns an String[] containing the keys to the locale specific error descriptions.
 java.lang.Exception getException()
          Returns the embedded exception.
 java.lang.String getExceptionTrace()
          Returns a String representing the Errors embedded exception stack trace.
 boolean hasException()
          Tests if the error has an embedded exception.
 boolean isDisplayed()
          Tests if the error has been displayed.
 boolean isInlineError()
          Tests if the error is an inline error.
 java.util.Iterator iterator()
           
 void setDisplayed(boolean b)
          Sets the flag that controls if this error was already displayed.
 JwmaException setException(java.lang.Exception ex)
          Sets an embedded exception.
 JwmaException setInlineError(boolean b)
          Sets the flag that controls if the Exception represents an inline error.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JwmaException

public JwmaException(java.lang.String msg)
Constructs a new JwmaException instance with a given description.

Parameters:
msg - the description of the Exception as String.

JwmaException

public JwmaException(java.lang.String msg,
                     boolean inlined)
Constructs a new JwmaException instance. with a given description and possibly as inline error.

Parameters:
msg - the description of the Exception as String.
inlined - true when inline error, false otherwise.
Method Detail

setInlineError

public JwmaException setInlineError(boolean b)
Sets the flag that controls if the Exception represents an inline error.

An inline error should be displayed within the same view and not on the error view.

Returns:
reference to this exception.

isInlineError

public boolean isInlineError()
Description copied from interface: JwmaError
Tests if the error is an inline error.

An inline error should be displayed within the same view and not on the error view.

Specified by:
isInlineError in interface JwmaError
Returns:
true if it is an inline error, false otherwise.

addDescription

public void addDescription(java.lang.String description)

getDescriptions

public java.lang.String[] getDescriptions()
Description copied from interface: JwmaError
Returns an String[] containing the keys to the locale specific error descriptions.

Specified by:
getDescriptions in interface JwmaError
Returns:
an array of strings containing the error description keys.

iterator

public java.util.Iterator iterator()

setDisplayed

public void setDisplayed(boolean b)
Sets the flag that controls if this error was already displayed.

Specified by:
setDisplayed in interface JwmaError
Parameters:
b - true if it was displayed, false otherwise.

isDisplayed

public boolean isDisplayed()
Description copied from interface: JwmaError
Tests if the error has been displayed.

Specified by:
isDisplayed in interface JwmaError
Returns:
true if it was displayed, false otherwise.

setException

public JwmaException setException(java.lang.Exception ex)
Sets an embedded exception.

Parameters:
ex - the exception to be embedded.
Returns:
reference to this exception.

hasException

public boolean hasException()
Description copied from interface: JwmaError
Tests if the error has an embedded exception.

Specified by:
hasException in interface JwmaError
Returns:
true if error has an embedded exception, false otherwise.

getExceptionTrace

public java.lang.String getExceptionTrace()
Description copied from interface: JwmaError
Returns a String representing the Errors embedded exception stack trace.

Specified by:
getExceptionTrace in interface JwmaError
Returns:
the error's embedded exception stacktrace as String.

getException

public java.lang.Exception getException()
Returns the embedded exception.

Returns:
the embedded exception.

Jwma

Copyright © 2000-2003 jwma team (All Rights Reserved.)