at.dms.compiler
Class PositionedError
java.lang.Object
|
+--java.lang.Throwable
|
+--java.lang.Exception
|
+--at.dms.util.FormattedException
|
+--at.dms.compiler.PositionedError
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- CBlockError, CMethodNotFoundError, CWarning
- public class PositionedError
- extends FormattedException
This class is the root class for all compiler errors with a reference
to the source text.
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, printStackTrace, printStackTrace, printStackTrace, toString |
Methods inherited from class java.lang.Object |
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PositionedError
public PositionedError(TokenReference where,
Message message)
- An error with a formatted message as argument.
- Parameters:
where
- the position in the source codemessage
- the formatted message
PositionedError
public PositionedError(TokenReference where,
MessageDescription description,
java.lang.Object[] parameters)
- An error with an arbitrary number of parameters.
- Parameters:
where
- the position in the source codedescription
- the message descriptionparameters
- the array of parameters
PositionedError
public PositionedError(TokenReference where,
MessageDescription description,
java.lang.Object parameter1,
java.lang.Object parameter2)
- An error with two parameters.
- Parameters:
where
- the position in the source codedescription
- the message descriptionparameter1
- the first parameterparameter2
- the second parameter
PositionedError
public PositionedError(TokenReference where,
MessageDescription description,
java.lang.Object parameter)
- An error with one parameter.
- Parameters:
where
- the position in the source codedescription
- the message descriptionparameter
- the parameter
PositionedError
public PositionedError(TokenReference where,
MessageDescription description)
- An error without parameters.
- Parameters:
where
- the position in the source codedescription
- the message description
getTokenReference
public TokenReference getTokenReference()
- Returns the position in the source code.
getMessage
public java.lang.String getMessage()
- Returns the string explaining the error.
- Overrides:
getMessage
in class FormattedException