uk.ac.man.cs.rainbow
Class Compiler.Error
java.lang.Object
|
+--uk.ac.man.cs.rainbow.Compiler.Error
- All Implemented Interfaces:
- Serializable
- Direct Known Subclasses:
- Compiler.ParseError, Compiler.PreciseError, Compiler.SemanticError, Compiler.Warning
- Enclosing class:
- Compiler
- public abstract static class Compiler.Error
- extends Object
- implements Serializable
A single error generated by a compiler. This is not an
exception, but rather a message that can be passed in an
exception (and across a network connection too.)
This class is both abstract and not directly subclass-able. If
you want an instance of it, you will need to see the already
extant subclasses of this class.
- See Also:
Compiler.Errors
, Serialized Form
Field Summary |
String[] |
detail
Anything else of interest relating to the error. |
int |
line
Where did this error happen. |
String |
message
What was the error. |
line
public final int line
- Where did this error happen. This is an approximate location.
message
public final String message
- What was the error. The standard error handler in the client
will format this string differently from the
detail
field.
detail
public final String[] detail
- Anything else of interest relating to the error. You might
wish to put details of how you are recovering from the problem
(if at all) in this. You may expect that each of the strings
in the array will be formatted as a separate line.
toTclString
public String toTclString()
- Convert to a form that is convenient for transferring to a Tcl
interpreter.
- Returns:
- A Tcl-formatted list whose first member is the line field in
this object, whose second member is the message field in this
object, and whose third argument is a list of detail strings
(built from the detail field in this class.)
- See Also:
Utils.makeTclLine(String[])
toString
public String toString()
- Overrides:
toString
in class Object