org.apache.jdo.model
Class ModelFatalException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.apache.jdo.model.ModelFatalException
All Implemented Interfaces:
java.io.Serializable

public class ModelFatalException
extends java.lang.RuntimeException

This exception indicates a fatal Model problem. Note this is an unchecked exception.

Since:
JDO 1.0.1
Author:
Michael Bouschen
See Also:
Serialized Form

Field Summary
private  java.lang.Throwable cause
          The throwable that caused this model exception to be thrown.
private  boolean inPrintStackTrace
          Flag indicating whether printStackTrace is being executed.
private static I18NHelper msg
          I18N support
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
ModelFatalException()
          Creates new ModelFatalException without detail message.
ModelFatalException(java.lang.String message)
          Constructs a ModelFatalException with the specified detail message.
ModelFatalException(java.lang.String message, java.lang.Throwable cause)
          Constructs a new ModelFatalException with the specified detail message and cause Exception.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this throwable or null if the cause is nonexistent or unknown.
 java.lang.String getMessage()
          Returns the error message string of this throwable object.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          Initializes the cause of this throwable to the specified value.
 void printStackTrace()
          Prints this ModelFatalException and its backtrace to the standard error output.
 void printStackTrace(java.io.PrintStream s)
          Prints this ModelFatalException and its backtrace to the specified print stream.
 void printStackTrace(java.io.PrintWriter s)
          Prints this ModelFatalException and its backtrace to the specified print writer.
 java.lang.String toString()
          The String representation includes the name of the class, the descriptive comment (if any), and the String representation of the cause (if any).
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cause

private java.lang.Throwable cause
The throwable that caused this model exception to be thrown.


inPrintStackTrace

private boolean inPrintStackTrace
Flag indicating whether printStackTrace is being executed.


msg

private static I18NHelper msg
I18N support

Constructor Detail

ModelFatalException

public ModelFatalException()
Creates new ModelFatalException without detail message.


ModelFatalException

public ModelFatalException(java.lang.String message)
Constructs a ModelFatalException with the specified detail message.

Parameters:
message - the detail message.

ModelFatalException

public ModelFatalException(java.lang.String message,
                           java.lang.Throwable cause)
Constructs a new ModelFatalException with the specified detail message and cause Exception.

Parameters:
message - the detail message.
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Method Detail

getCause

public java.lang.Throwable getCause()
Returns the cause of this throwable or null if the cause is nonexistent or unknown. (The cause is the throwable that caused this throwable to get thrown.)

Returns:
the cause of this throwable or null if the cause is nonexistent or unknown.

initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
Initializes the cause of this throwable to the specified value. (The cause is the throwable that caused this throwable to get thrown.)

Parameters:
cause - the cause (which is saved for later retrieval by the getCause() method). (A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Returns:
a reference to this ModelFatalException instance.

getMessage

public java.lang.String getMessage()
Returns the error message string of this throwable object.

Returns:
the error message string of this ModelException object if it was created with an error message string, the error message of the cause if it was not created a message but the cause has a message, or null if neither has an error message.

toString

public java.lang.String toString()
The String representation includes the name of the class, the descriptive comment (if any), and the String representation of the cause (if any).

Returns:
the String.

printStackTrace

public void printStackTrace()
Prints this ModelFatalException and its backtrace to the standard error output. Print cause Throwable's stack trace as well.


printStackTrace

public void printStackTrace(java.io.PrintStream s)
Prints this ModelFatalException and its backtrace to the specified print stream. Print cause Throwable's stack trace as well.

Parameters:
s - PrintStream to use for output

printStackTrace

public void printStackTrace(java.io.PrintWriter s)
Prints this ModelFatalException and its backtrace to the specified print writer. Print cause Throwable' stack trace as well.

Parameters:
s - PrintWriter to use for output