Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

applicationexception.h

Go to the documentation of this file.
00001 00008 /*************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or modify * 00011 * it under the terms of the GNU General Public License as published by * 00012 * the Free Software Foundation; either version 2 of the License, or * 00013 * (at your option) any later version. * 00014 * * 00015 ***************************************************************************/ 00016 00017 #ifndef APPLICATIONEXCEPTION_H 00018 #define APPLICATIONEXCEPTION_H 00019 00020 #include <iostream> 00021 #include <string> 00022 00023 using namespace std; 00024 00031 class ApplicationError 00032 { 00033 public: 00034 00040 ApplicationError(string errormsg,string function_name): 00041 errormsg(errormsg),function_name(function_name) 00042 {} 00043 00050 virtual string message() 00051 { 00052 return ("ApplicationError: "+errormsg+" occured in "+function_name); 00053 } 00054 00055 00056 protected: 00057 string errormsg; 00058 string function_name; 00059 }; 00060 00063 inline ostream& operator<<(ostream &s, ApplicationError &e) 00064 { 00065 s << e.message(); 00066 return s; 00067 } 00068 00069 #endif 00070 00071 /* History 00072 00073 $Log: applicationexception.h,v $ 00074 Revision 1.1 2003/02/19 08:19:53 gernot 00075 Initial revision 00076 00077 Revision 1.12 2003/01/19 16:50:27 ghillie 00078 - removed severity in exceptions. No FATAL-automatic-exit any more. 00079 Removed many FATAL conditions, other ones are exiting now by themselves 00080 00081 Revision 1.11 2002/12/13 09:57:10 ghillie 00082 - error message formatting done by exception classes now 00083 00084 Revision 1.10 2002/12/10 15:03:04 ghillie 00085 - added missing include<string>, using namespace std 00086 00087 Revision 1.9 2002/12/09 15:19:53 ghillie 00088 - removed severity WARNING 00089 - removed printing of error message in ERROR severity 00090 00091 Revision 1.8 2002/11/29 10:20:44 ghillie 00092 - updated docs, use doxygen format now 00093 00094 Revision 1.7 2002/11/27 15:54:02 ghillie 00095 updated docu for doxygen 00096 00097 Revision 1.6 2002/11/25 21:00:53 ghillie 00098 - improved documentation, now doxygen-readabl 00099 00100 Revision 1.5 2002/11/18 14:21:07 ghillie 00101 - moved global severity_t to ApplicationError::severity_t 00102 - added throw() declarations to header files 00103 00104 Revision 1.4 2002/11/17 14:34:17 ghillie 00105 small change in header description 00106 00107 Revision 1.3 2002/11/13 08:34:54 ghillie 00108 moved history to the bottom 00109 00110 Revision 1.2 2002/10/27 12:47:20 ghillie 00111 - added multithread support for python 00112 - changed callcontrol reference to stay in the python namespace 00113 - changed ApplicationError to support differen severity 00114 00115 Revision 1.1 2002/10/25 13:29:38 ghillie 00116 grouped files into subdirectories 00117 00118 Revision 1.1 2002/10/24 09:58:12 ghillie 00119 definition of application exceptions will stay here 00120 00121 */

Generated on Sun Nov 28 14:37:44 2004 for CapiSuite by doxygen 1.3.8