org.apache.cocoon.util.location
Interface LocatableException

All Superinterfaces:
Locatable
All Known Implementing Classes:
LocatedException, LocatedRuntimeException

public interface LocatableException
extends Locatable

Extension of Locatable for exceptions.

In order to dump location information in the stacktrace, the getMessage() method of a Locatable exception should return a concatenation of the raw message (given in the constructor) and the exception's location, e.g. "foo failed (file.xml:12:3)". However, Locatable-aware classes will want to handle the raw message (i.e. "foo failed") and location separately. This interface gives access to the raw message.

Note: care should be taken for locatable exceptions to use only immutable and serializable implementations of Location

Since:
2.1.8
Version:
$Id: LocatableException.html 1304280 2012-03-23 11:18:01Z ilgrosso $
See Also:
LocationImpl.get(Location)

Method Summary
 String getRawMessage()
          Get the raw message of the exception (the one used in the constructor)
 
Methods inherited from interface org.apache.cocoon.util.location.Locatable
getLocation
 

Method Detail

getRawMessage

public String getRawMessage()
Get the raw message of the exception (the one used in the constructor)

Returns:
the raw message


Copyright © 1999-2008 The Apache Software Foundation. All Rights Reserved.