unsw.cse.framescript
Class FSException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by unsw.cse.framescript.FSException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
FSIOException, FSMicaException, SyntaxError

public class FSException
extends java.lang.Exception

This exception class represents all errors that FrameScript is setup to detect and handle. All exception thrown while FrameScript is running should be wrapped by an FSException which will then be throw so it can be handled appropriately.

Author:
mmcgill
See Also:
Serialized Form

Constructor Summary
FSException(java.lang.Exception e)
          Creates a FSException to wrap an exception.
FSException(java.lang.Exception e, StackFrame frame)
          Creates a FSException to wrap an exception with a variable environment.
FSException(java.lang.String msg)
          Creates an error with a specified message.
FSException(java.lang.String msg, StackFrame frame)
          Creates an error with a specified message and a variable environment.
 
Method Summary
 void dumpStack()
          Dumps the variable stack for the error.
 java.lang.String getMessage()
           
 FSException setParentStackFrame(StackFrame frame)
          Sets the stackframe inheritence that caused the error to fire.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, 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

FSException

public FSException(java.lang.String msg)
Creates an error with a specified message.

Parameters:
msg - the error message

FSException

public FSException(java.lang.String msg,
                   StackFrame frame)
Creates an error with a specified message and a variable environment.

Parameters:
msg - the error message
frame - the variable environment

FSException

public FSException(java.lang.Exception e)
Creates a FSException to wrap an exception.

Parameters:
e - the exception to be wrapped

FSException

public FSException(java.lang.Exception e,
                   StackFrame frame)
Creates a FSException to wrap an exception with a variable environment.

Parameters:
e - the exception being wrapped
frame - the variable environment
Method Detail

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable

setParentStackFrame

public FSException setParentStackFrame(StackFrame frame)
                                throws FSException
Sets the stackframe inheritence that caused the error to fire.

Parameters:
frame - the new ancestor StackFrame
Returns:
nothing, it throws itself
Throws:
FSException - this

dumpStack

public void dumpStack()
Dumps the variable stack for the error.