Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime
Class QTRuntimeException

    java.lang.Object
      |
      +--java.lang.Throwable
            |
            +--java.lang.Exception
                  |
                  +--java.lang.RuntimeException
                        |
                        +--quicktime.QTRuntimeException

All Implemented Interfaces:
  java.io.Serializable

public class QTRuntimeException
extends java.lang.RuntimeException

QTRuntimeExceptions are thrown by the QTJava classes when an exceptional condition is caused that cannot be recovered from at runtime. This will usually occur within a java method (for eg. clone()) that has not API for throwing an exception. In the clone method for instance this exception is thrown if there is an out of memory condition.

See Also:
  Serialized Form

Constructor Summary
`QTRuntimeException(java.lang.Exception e)` Creates a QTRuntimeException
`QTRuntimeException(int val)` Creates an QTRuntimeException with a message that could contain information that could be displayed to the user.
`QTRuntimeException(QTException e)` Creates a QTRuntimeException
`QTRuntimeException(java.lang.String str)` Creates an QTRuntimeException with a message that could contain information that could be displayed to the user.

Method Summary
`int` | `errorCode()` Return the error code that generated the exception.
`java.lang.String` | `errorCodeToString()` Returns a string that represents the error code of the current QTException.
`static void` | `handleOrThrow(QTRuntimeException e, java.lang.Object eGenerator, java.lang.String methodNameIfKnown)` If there is a handler registered for the exception it will be passed to that handler.
`static void` | `registerHandler(QTRuntimeHandler h)` This registers an object that will handle the runtime Exceptions that may be generated through the (ab)normal running of a QTJava application or applet.
`java.lang.String` | `toString()` Print current build information and current exception details.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getLocalizedMessage, getMessage, printStackTrace, printStackTrace, printStackTrace`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### QTRuntimeException

    public QTRuntimeException(QTException e)

  Creates a QTRuntimeException
  Parameters:
    `e` - the QTException that created the runtime error

### QTRuntimeException

    public QTRuntimeException(java.lang.Exception e)

  Creates a QTRuntimeException
  Parameters:
    `e` - the Exception that created the runtime error

### QTRuntimeException

    public QTRuntimeException(int val)

  Creates an QTRuntimeException with a message that could contain information that could be displayed to the user.
  Parameters:
    `val` - typically some error code

### QTRuntimeException

    public QTRuntimeException(java.lang.String str)

  Creates an QTRuntimeException with a message that could contain information that could be displayed to the user.
  Parameters:
    `str` - The message that could be displayed to the user

Method Detail

### handleOrThrow

    public static void handleOrThrow(QTRuntimeException e,
                                     java.lang.Object eGenerator,
                                     java.lang.String methodNameIfKnown)

  If there is a handler registered for the exception it will be passed to that handler. The handler should either deal with the exception or throw it - particularly if the exception is notified as a potentially serious exception - eg. memFullErr
  Parameters:
    `e` - the exception to either handle or throw

### registerHandler

    public static void registerHandler(QTRuntimeHandler h)

  This registers an object that will handle the runtime Exceptions that may be generated through the (ab)normal running of a QTJava application or applet.
  Parameters:
    `h` - the QTRuntimeHandler that will handle or throw QTRuntimeExceptions or null to remove handler.

### errorCode

    public final int errorCode()

  Return the error code that generated the exception. If there was no QT error code number known this value will be 0 in which case the message contains information about the exception.
  Returns:
    an int

### errorCodeToString

    public java.lang.String errorCodeToString()

  Returns a string that represents the error code of the current QTException. This will return the name of the error code as represented in the quicmtime.Errors interface. If the error code is unknown then the string "Unknown Error Code" will be returned.
  Returns:
    a string that represents the current error code of the QTException.

### toString

    public java.lang.String toString()

  Print current build information and current exception details.
  Overrides:
    `toString` in class `java.lang.Throwable`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD