coins
Class PassException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bycoins.PassException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PassStopException, ProcessException, SyntaxErrorException

public class PassException
extends java.lang.Exception

Various exceptions in passes.
When a compiler driver catches a PassException, it is expected that 1) the driver restores the contexts (i.e., HirRoot, LirRoot, etc.) in the state at prior to the beginning of the pass and restarts the compilation of the source file by going an alternative way, or 2) the driver abandons the source file, goes on the next source file and doesn't link object files.
PassException thrower must write an error message if it is required, because the compiler driver never writes it.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.lang.Exception
 
Constructor Summary
PassException(java.io.File sourceFile, int lineNumber, java.lang.String passName, java.lang.String message)
          Creates a pass exception with a message, a source file name, and a line number.
PassException(java.io.File sourceFile, java.lang.String passName, java.lang.String message)
          Creates a pass exception with a message and a source file name.
PassException(java.lang.String passName, java.lang.String message)
          Creates a pass exception with a message.
 
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

PassException

public PassException(java.io.File sourceFile,
                     int lineNumber,
                     java.lang.String passName,
                     java.lang.String message)
Creates a pass exception with a message, a source file name, and a line number.

Parameters:
sourceFile - The source file which contains this exception.
lineNumber - The line number in the source file which contains this exception.
passName - The pass name where this exception is occurred.
message - The message describing this exception.

PassException

public PassException(java.io.File sourceFile,
                     java.lang.String passName,
                     java.lang.String message)
Creates a pass exception with a message and a source file name. Use when a line number cannot be specified.

Parameters:
sourceFile - The source file which contains this exception.
passName - The pass name where this exception is occurred.
message - The message describing this exception.

PassException

public PassException(java.lang.String passName,
                     java.lang.String message)
Creates a pass exception with a message. Use when a source file cannot be specified (e.g., linker).

Parameters:
passName - The pass name where this exception is occurred.
message - The message describing this exception.