|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.commons.lang.exception.NestableRuntimeException
org.apache.cocoon.util.location.LocatedRuntimeException
public class LocatedRuntimeException
A cascading and located RuntimeException. It is also MultiLocatable to easily build
location stack traces.
If a LocatedRuntimeException is built with a location and a cause which is also a
LocatedRuntimeException, then the default behavior is to add the location to the cause
exception and immediately rethrow the cause. This avoids exception nesting and builds a location
stack.
| Field Summary |
|---|
| Fields inherited from class org.apache.commons.lang.exception.NestableRuntimeException |
|---|
delegate |
| Constructor Summary | |
|---|---|
LocatedRuntimeException(String message)
|
|
LocatedRuntimeException(String message,
Location location)
|
|
LocatedRuntimeException(String message,
Throwable cause)
|
|
LocatedRuntimeException(String message,
Throwable cause,
Location location)
|
|
LocatedRuntimeException(String message,
Throwable cause,
Location location,
boolean rethrowLocated)
|
|
| Method Summary | |
|---|---|
void |
addLocation(Location loc)
Add a location to the current list of locations. |
Location |
getLocation()
Get the location of this object |
List |
getLocations()
Return the list of locations. |
String |
getMessage()
|
String |
getRawMessage()
Get the raw message of the exception (the one used in the constructor) |
| Methods inherited from class org.apache.commons.lang.exception.NestableRuntimeException |
|---|
getCause, getMessage, getMessages, getThrowable, getThrowableCount, getThrowables, indexOfThrowable, indexOfThrowable, printPartialStackTrace, printStackTrace, printStackTrace, printStackTrace |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public LocatedRuntimeException(String message)
public LocatedRuntimeException(String message,
Throwable cause)
throws LocatedRuntimeException
LocatedRuntimeException
public LocatedRuntimeException(String message,
Location location)
public LocatedRuntimeException(String message,
Throwable cause,
Location location)
throws LocatedRuntimeException
LocatedRuntimeException
public LocatedRuntimeException(String message,
Throwable cause,
Location location,
boolean rethrowLocated)
throws LocatedRuntimeException
LocatedRuntimeException| Method Detail |
|---|
public Location getLocation()
Locatable
getLocation in interface Locatablepublic List getLocations()
MultiLocatable
getLocations in interface MultiLocatablepublic String getRawMessage()
LocatableException
getRawMessage in interface LocatableExceptionpublic String getMessage()
getMessage in interface org.apache.commons.lang.exception.NestablegetMessage in class org.apache.commons.lang.exception.NestableRuntimeExceptionpublic void addLocation(Location loc)
MultiLocatable
Implementations are free to filter locations that can be added (e.g. Location.UNKNOWN),
and there is therefore no guarantee that the given location will actually be added to the list.
Filtered locations are silently ignored.
addLocation in interface MultiLocatableloc - the location to be added.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||