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:
- 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 ). |
String |
getMessage()
Returns the message specified at creation time, preceeded with nicely formatted location
information (if any). |
LocatedException
public LocatedException(String message,
Location optionalLocation)
LocatedException
public LocatedException(String message,
Location optionalLocation,
Throwable optionalCause)
getMessage
public String getMessage()
- Returns the message specified at creation time, preceeded with nicely formatted location
information (if any).
- Overrides:
getMessage
in class Throwable
getLocation
public Location getLocation()
- Returns the
Location
object specified at
construction time (may be null
).