1 /* 2 * Copyright 2005 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.apache.cocoon.util.location; 17 18 /** 19 * Extension of {@link Locatable} for exceptions. 20 * <p> 21 * In order to dump location information in the stacktrace, the <code>getMessage()</code> method of 22 * a {@link Locatable} exception should return a concatenation of the raw message (given in the 23 * constructor) and the exception's location, e.g. "<code>foo failed (file.xml:12:3)</code>". However, 24 * {@link Locatable}-aware classes will want to handle the raw message (i.e. "<code>foo failed</code>") 25 * and location separately. This interface gives access to the raw message. 26 * <p> 27 * <strong>Note:</strong> care should be taken for locatable exceptions to use only immutable and 28 * serializable implementations of {@link Location} ({@see org.apache.cocoon.util.location.LocationImpl#get(Location)}). 29 * 30 * @since 2.1.8 31 * @version $Id: LocatableException.java 232400 2005-08-12 22:14:26Z sylvain $ 32 */ 33 public interface LocatableException extends Locatable { 34 35 /** 36 * Get the raw message of the exception (the one used in the constructor) 37 * 38 * @return the raw message 39 */ 40 public String getRawMessage(); 41 } 42