1/* Copyright (C) 2003 Vladimir Roubtsov. All rights reserved. 2 * 3 * This program and the accompanying materials are made available under 4 * the terms of the Common Public License v1.0 which accompanies this distribution, 5 * and is available at http://www.eclipse.org/legal/cpl-v10.html 6 * 7 * $Id: ICodedException.java,v 1.1.1.1 2004/05/09 16:57:58 vlad_r Exp $ 8 */ 9package com.vladium.util.exception; 10 11// ---------------------------------------------------------------------------- 12/** 13 * TODO: javadoc 14 * 15 * This interface is implemented by {@link AbstractException} and 16 * {@link AbstractRuntimeException} to provide a common interface 17 * for accessing error codes.<P> 18 * 19 * An error code is a compact string representing the nature of exception 20 * in a programmatic locale-independent way. It can be used as a key that maps 21 * to a human-readable error message in a resource bundle. For details, see 22 * the exception classes mentioned above. 23 * 24 * @author Vlad Roubtsov, (C) 2002 25 */ 26public 27interface ICodedException 28{ 29 // public: ................................................................ 30 31 /** 32 * Returns the String that was passed as 'message' argument to an exception 33 * constructor. For a coded exception this will be the compact error code 34 * [and different from the result of <code>getMessage()</code>], otherwise 35 * this will be traditional error message. 36 * 37 * @return message code string [can be null] 38 */ 39 String getErrorCode (); 40 41} // end of interface 42// ---------------------------------------------------------------------------- 43