|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Throwable java.lang.Exception java.lang.RuntimeException edu.cornell.cs.cs4120.xi.CompilationException
public class CompilationException
An exception indicating an invalid Xi program.
Constructor Summary | |
---|---|
CompilationException(Position position)
Constructs a generic compilation exception indicating offending code at the given position. |
|
CompilationException(String message,
Position position)
Constructs a compilation exception indicating offending code at the given position with the given message as a reason. |
Method Summary | |
---|---|
Position |
getPosition()
Returns the position in the offending Xi code. |
String |
toString()
Returns a human-friendly representation of this exception, including the compilation unit (if available), the line number, and the error message. |
Methods inherited from class java.lang.Throwable |
---|
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CompilationException(Position position)
position
- the position of the code causing this compilation exceptionpublic CompilationException(String message, Position position)
message
- the reason for this compilation exceptionposition
- the position of the code causing this compilation exceptionMethod Detail |
---|
public final Position getPosition()
public String toString()
toString
in class Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |