at.dms.ksm
Class KsmError

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--antlr.ANTLRException
                    |
                    +--antlr.RecognitionException
                          |
                          +--at.dms.ksm.KsmError
All Implemented Interfaces:
java.io.Serializable

public class KsmError
extends antlr.RecognitionException

Error thrown on problems encountered while running the assembler itself.

See Also:
Serialized Form

Field Summary
protected  Message message
          Error message.
protected  TokenReference where
          Location in source where the error happened.
 
Fields inherited from class antlr.RecognitionException
column, fileName, line
 
Constructor Summary
KsmError(TokenReference where, Message message)
          An error with a formatted message as argument.
KsmError(TokenReference where, MessageDescription desc)
          An error without parameters.
KsmError(TokenReference where, MessageDescription desc, java.lang.Object param)
          An error with one parameter.
KsmError(TokenReference where, MessageDescription desc, java.lang.Object[] params)
          An error with with an arbitrary number of parameters.
KsmError(TokenReference where, MessageDescription desc, java.lang.Object param1, java.lang.Object param2)
          An error with two parameters
 
Method Summary
 java.lang.String getErrorMessage()
          Return the string explaining the error and the token reference.
 java.lang.String getMessage()
          ...
 MessageDescription getMessageDescription()
          ...
 
Methods inherited from class antlr.RecognitionException
getColumn, getFilename, getLine, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

where

protected TokenReference where
Location in source where the error happened.

message

protected Message message
Error message.
Constructor Detail

KsmError

public KsmError(TokenReference where,
                Message message)
An error with a formatted message as argument.
Parameters:
where - the reference to token where error happened.
message - the formatted message.

KsmError

public KsmError(TokenReference where,
                MessageDescription desc,
                java.lang.Object[] params)
An error with with an arbitrary number of parameters.
Parameters:
where - the reference to token where error happened.
desc - the message ident to be displayed.
params - the array of parameters.

KsmError

public KsmError(TokenReference where,
                MessageDescription desc,
                java.lang.Object param1,
                java.lang.Object param2)
An error with two parameters
Parameters:
where - the reference to token where error happened.
desc - the message ident to be displayed.
param1 - the first parameter.
param2 - the second parameter.

KsmError

public KsmError(TokenReference where,
                MessageDescription desc,
                java.lang.Object param)
An error with one parameter.
Parameters:
where - the reference to token where error happened.
desc - the message ident to be displayed.
param - the parameter.

KsmError

public KsmError(TokenReference where,
                MessageDescription desc)
An error without parameters.
Parameters:
where - the reference to token where error happened.
desc - the message ident to be displayed.
Method Detail

getMessageDescription

public MessageDescription getMessageDescription()
...

getErrorMessage

public java.lang.String getErrorMessage()
Return the string explaining the error and the token reference.
Overrides:
getErrorMessage in class antlr.RecognitionException

getMessage

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