org.qtitools.qti.exception
Class QTIRuntimeException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.qtitools.qti.exception.QTIRuntimeException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
QTIAttributeException, QTIEvaluationException, QTIItemFlowException, QTINodeGroupException, QTIParseException, QTIValidationException

public abstract class QTIRuntimeException
extends java.lang.RuntimeException

Superclass of all unchecked exceptions.

It is abstract class because you should never use this class directly. For example:

 throw new QTIRuntimeException()
 
(this is not possible anyway)

And you should never use this class in method header also. For example:

 void someMethod() throws QTIRuntimeException
 

Only two legal usages are as superclass of all unchecked exceptions and in catch block, when you don't need to distinguish between different exceptions types. For example:

 try
 {
   ... some code here ...
 }
 catch (QTIRuntimeException ex)
 {
   ... some code here ...
 }
 

We have decided to use only unchecked exceptions in JQTI library. There is big discussion on Internet about checked/unchecked exceptions (see Google).

Author:
Jiri Kajaba
See Also:
QTIException, Serialized Form

Constructor Summary
QTIRuntimeException()
          Constructs A new exception with null as its detailed message.
QTIRuntimeException(java.lang.String message)
          Constructs A new exception with the specified detailed message.
QTIRuntimeException(java.lang.String message, java.lang.Throwable cause)
          Constructs A new exception with the specified detailed message and cause.
QTIRuntimeException(java.lang.Throwable cause)
          Constructs A new exception with the specified cause.
 
Method Summary
 
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

QTIRuntimeException

public QTIRuntimeException()
Constructs A new exception with null as its detailed message.


QTIRuntimeException

public QTIRuntimeException(java.lang.String message)
Constructs A new exception with the specified detailed message.

Parameters:
message - the detail message

QTIRuntimeException

public QTIRuntimeException(java.lang.String message,
                           java.lang.Throwable cause)
Constructs A new exception with the specified detailed message and cause.

Parameters:
message - the detail message
cause - the cause

QTIRuntimeException

public QTIRuntimeException(java.lang.Throwable cause)
Constructs A new exception with the specified cause. If cause is not null detailed message is set from this cause.

Parameters:
cause - the cause


Copyright © 2009. All Rights Reserved.