Package org.codehaus.commons.compiler

# Class LocatedException

java.lang.Object
java.lang.Throwable
java.lang.Exception
org.codehaus.commons.compiler.LocatedException

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `CompileException`

public class LocatedException extends Exception
An `Exception` that is associated with an optional `Location` in a source file.

See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`LocatedException(String message, Location location)`
`LocatedException(String message, Location location, Throwable cause)`

## Method Summary

Modifier and Type
Method
Description
`Location`
`getLocation()`
`String`
`getMessage()`
Returns the message specified at creation time, preceeded with nicely formatted location information (if any).

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### LocatedException

public LocatedException(String message, @Nullable Location location)

### LocatedException

public LocatedException(String message, @Nullable Location location, @Nullable Throwable cause)

## Method Details

### 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

@Nullable public Location getLocation()

Returns:
  The `Location` specified at construction time (may be `null`)