00001 /*---------------------------------------------------------------------+ 00002 | Library QgarLib, graphics analysis and recognition | 00003 | Copyright (C) 2002 Qgar Project, LORIA | 00004 | | 00005 | This library is free software; you can redistribute it and/or | 00006 | modify it under the terms of the GNU Lesser General Public | 00007 | License version 2.1, as published by the Free Software Foundation. | 00008 | | 00009 | This library is distributed in the hope that it will be useful, | 00010 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 00011 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 00012 | See the GNU Lesser General Public License for more details. | 00013 | | 00014 | The GNU Lesser General Public License is included in the file | 00015 | LICENSE.LGPL, in the root directory of the Qgar packaging. See | 00016 | http://www.gnu.org/licenses/lgpl.html for the terms of the licence. | 00017 | To receive a paper copy, write to the Free Software Foundation, | 00018 | Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. | 00019 | | 00020 | Contact Project Qgar for any information: | 00021 | LORIA - équipe Qgar | 00022 | B.P. 239, 54506 Vandoeuvre-lès-Nancy Cedex, France | 00023 | email: qgar-contact@loria.fr | 00024 | http://www.qgar.org/ | 00025 *---------------------------------------------------------------------*/ 00026 00027 00028 #ifndef __QGARERRORDEVELOPER_H_INCLUDED__ 00029 #define __QGARERRORDEVELOPER_H_INCLUDED__ 00030 00031 00032 /** 00033 * @file QgarErrorDeveloper.H 00034 * @brief Header file of class qgar::QgarErrorDeveloper. 00035 * 00036 * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Gerald Masini">Gerald Masini</a> 00037 * @date November 7, 2003 16:16 00038 * @since Qgar 2.1 00039 */ 00040 00041 00042 // For RCS/CVS use: Do not delete 00043 /* $Id: QgarErrorDeveloper.H,v 1.10 2005/01/11 13:14:10 masini Exp $ */ 00044 00045 00046 00047 // STL 00048 #include <stdexcept> 00049 #include <string> 00050 // QGAR 00051 #include <qgarlib/AbstractQgarError.H> 00052 00053 00054 00055 namespace qgar 00056 { 00057 00058 00059 /** 00060 * @class QgarErrorDeveloper QgarErrorDeveloper.H "qgarlib/QgarErrorDeveloper.H" 00061 * @ingroup ERROR 00062 * @brief Class for Qgar developer exceptions. 00063 * 00064 * A developer exception is raised within code being developed: 00065 * Incomplete or raw implementation, exotic case, bug in an experimental 00066 * algorithm, etc. 00067 * 00068 * @author <a href="mailto:qgar-develop@loria.fr?subject=Qgar fwd Gerald Masini">Gerald Masini</a> 00069 * @date November 7, 2003 16:16 00070 * @since Qgar 2.1 00071 */ 00072 class QgarErrorDeveloper 00073 00074 : public std::logic_error, 00075 public AbstractQgarError 00076 00077 { 00078 // ------------------------------------------------------------------- 00079 // P U B L I C M E M B E R S 00080 // ------------------------------------------------------------------- 00081 public: 00082 00083 /** @name Constructors */ 00084 // ============ 00085 //@{ 00086 /** 00087 * @brief Construct from the profile of the function throwing 00088 * the exception, without displaying any error message. 00089 * @param aFuncProfile profile of the function throwing the exception 00090 */ 00091 QgarErrorDeveloper(const char* aFuncProfile); 00092 00093 /** 00094 * @brief Construct and display an error message. 00095 * @param aFileName name of the file including the function throwing the exception 00096 * @param aLineNumber line number (in the file) of the <b>throw</b> instruction 00097 * @param aFuncProfile profile of the function throwing the exception 00098 * @param aDiagnostic full explicit diagnostic 00099 * 00100 * An error message includes 4 lines: 00101 * - message header, displayed by 00102 * qgar::AbstractQgarError::displayErrorMessageHeader(const char*) 00103 * - file name and line number of the corresponding <b>throw</b> instruction 00104 * - function profile 00105 * - diagnostic 00106 */ 00107 QgarErrorDeveloper(const char* aFileName, 00108 int aLineNumber, 00109 const char* aFuncProfile, 00110 const std::string aDiagnostic); 00111 //@} 00112 00113 00114 /** @name Destructor */ 00115 // ========== 00116 //@{ 00117 /** 00118 * @brief Virtual destructor. 00119 */ 00120 virtual ~QgarErrorDeveloper() throw(); 00121 //@} 00122 00123 // ------------------------------------------------------------------- 00124 }; // class QgarErrorDeveloper 00125 00126 00127 } // namespace qgar 00128 00129 #endif /* __QGARERRORDEVELOPER_H_INCLUDED__ */