MathFormatException
Date: 2007-08-14

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

## tcra
Class MathFormatException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              tcra.MathFormatException

All Implemented Interfaces:
  java.io.Serializable

    public class MathFormatException

extends java.lang.Exception

MathFormatException is thrown by MathTypeParsers when it discovers it is parsing a malformed String format. It wraps any other Exception that may be thrown during parsing as well.

Based on SAXException at: http://www.openhealth.org/RDDL/org/xml/sax/SAXException.java

See Also:
  Serialized Form

Constructor Summary
`MathFormatException()` Default constructor.
`MathFormatException(java.lang.Exception e)` Constructor specifying the exception to be wrapped.
`MathFormatException(java.lang.String message)` Constructor specifying message to be printed.
`MathFormatException(java.lang.String message, java.lang.Exception e)` Constructor specifying a custom error message and a wrapped exception.

Method Summary
`java.lang.Exception` | `getException()` Return the wrapped exception.
`java.lang.String` | `getMessage()` Return the exception message.
`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`

Constructor Detail

### MathFormatException

    public MathFormatException()

  Default constructor. Does not contain any wrapped exception. No custom error message.

### MathFormatException

    public MathFormatException(java.lang.String message)

  Constructor specifying message to be printed. Does not wrap a sub-exception.

  Parameters:
    `message` - Custom error message that will be printed to user.

### MathFormatException

    public MathFormatException(java.lang.Exception e)

  Constructor specifying the exception to be wrapped. The exception comes from some other function that throws an error. No custom error message.

  Parameters:
    `e` - Exception that occured during parsing from some other function.

### MathFormatException

    public MathFormatException(java.lang.String message,
                               java.lang.Exception e)

  Constructor specifying a custom error message and a wrapped exception.

  Parameters:
    `message` - Custom error message that will be printed to the user.
    `e` - Wrapped exception.

Method Detail

### getMessage

    public java.lang.String getMessage()

  Return the exception message. Will first try to return the message from Exception, then the wrapped exception's message, and lastly the MathFormatException message.

  Overrides:
    `getMessage` in class `java.lang.Throwable`
  Returns:
    String Exception message.

### getException

    public java.lang.Exception getException()

  Return the wrapped exception.

  Returns:
    Exception thrown by some process during parsing.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Throwable`

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