org.codehaus.janino.util
Class LocatedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.codehaus.janino.util.CausedException
org.codehaus.janino.util.LocatedException
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- CompileException, Parser.ParseException, Scanner.ScanException
- public class LocatedException
- extends CausedException
An Exception
that is associated with an optional Location
in a source file.
- See Also:
- Serialized Form
Method Summary |
Location |
getLocation()
Returns the Location object specified at
construction time (may be null ). |
java.lang.String |
getMessage()
Returns the message specified at creation time, preceeded with nicely formatted location
information (if any). |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getLocalizedMessage, getStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
LocatedException
public LocatedException(java.lang.String message,
Location optionalLocation)
LocatedException
public LocatedException(java.lang.String message,
Location optionalLocation,
java.lang.Throwable optionalCause)
getMessage
public java.lang.String getMessage()
- Returns the message specified at creation time, preceeded with nicely formatted location
information (if any).
getLocation
public Location getLocation()
- Returns the
Location
object specified at
construction time (may be null
).