- Timestamp:
- 08/07/09 09:38:20 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
library/bdm/base/user_info.h
r478 r483 45 45 const string path; 46 46 47 private: 48 string what_message; 49 50 public: 47 51 //! Use this constructor when you can pass the problematical Setting as a parameter 48 52 UIException ( const string &message, const Setting &element ) 49 53 : message ( "UI error: " + message + "." ), path ( "Check path \"" + string ( element.getPath() ) + "\"." ) { 54 init_what_message(); 50 55 } 51 56 … … 53 58 UIException ( const string &message, const string &path ) 54 59 : message ( "UI error: " + message + "." ), path ( "Check path \"" + path + "\"." ) { 60 init_what_message(); 55 61 } 56 62 57 63 //! Overriden method for reporting an error message 58 64 virtual const char* what() const throw() { 59 return ( message + " " + path ).c_str(); 60 } 65 return what_message.c_str(); 66 } 67 61 68 ~UIException() throw() {}; 69 70 private: 71 void init_what_message() { 72 what_message = message; 73 what_message += ' '; 74 what_message += path; 75 } 62 76 }; 63 77