#include <cmt_error.h>
Public Types | |
enum | code { ok, warning, symbol_not_found, pattern_not_found, syntax_error, command_not_implemented, package_not_found, path_not_found, version_conflict, file_access_error, execution_error, cannot_lock, cannot_write_lock, cannot_run_lock_command, cannot_unlock, cannot_run_unlock_command, cannot_remove_lock, conflicting_lock, unknown_command, project_release_conflict } |
Static Public Member Functions | |
void | clear () |
code | get_last_error_code () |
bool | has_pending_error () |
const cmt_string & | get_error_name (code error) |
void | set (code error, const cmt_string &text) |
cmt_string | get_last_error () |
void | print () |
|
Definition at line 17 of file cmt_error.h. Referenced by get_last_error_code().
00018 { 00019 ok, 00020 warning, 00021 symbol_not_found, 00022 pattern_not_found, 00023 syntax_error, 00024 command_not_implemented, 00025 package_not_found, 00026 path_not_found, 00027 version_conflict, 00028 file_access_error, 00029 execution_error, 00030 cannot_lock, 00031 cannot_write_lock, 00032 cannot_run_lock_command, 00033 cannot_unlock, 00034 cannot_run_unlock_command, 00035 cannot_remove_lock, 00036 conflicting_lock, 00037 unknown_command, 00038 project_release_conflict 00039 } code; |
|
Definition at line 87 of file cmt_error.cxx. References Error::clear(), and Error::instance(). Referenced by Cmt::clear(), SyntaxParser::do_parse_requirements(), SyntaxParser::do_parse_words(), and Cmt::parser().
00088 { 00089 Error& e = Error::instance (); 00090 00091 e.clear (); 00092 } |
|
Definition at line 112 of file cmt_error.cxx. References Error::get_name(), and Error::instance(). Referenced by get_last_error(), and print().
00113 { 00114 Error& e = Error::instance (); 00115 00116 return (e.get_name (error)); 00117 } |
|
Definition at line 128 of file cmt_error.cxx. References Error::get_code(), get_error_name(), Error::get_text(), and Error::instance(). Referenced by Cmt::configure().
00129 { 00130 Error& e = Error::instance (); 00131 00132 cmt_string result; 00133 00134 result = get_error_name (e.get_code ()); 00135 result += " : "; 00136 result += e.get_text (); 00137 00138 return (result); 00139 } |
|
Definition at line 104 of file cmt_error.cxx. References code, Error::get_code(), and Error::instance(). Referenced by Cmt::parser().
00105 { 00106 Error& e = Error::instance (); 00107 00108 return (e.get_code ()); 00109 } |
|
Definition at line 95 of file cmt_error.cxx. References Error::get_code(), Error::instance(), and ok. Referenced by Cmt::configure(), SyntaxParser::do_parse_text(), SyntaxParser::do_parse_words(), Cmt::load(), and Cmt::parser().
00096 { 00097 Error& e = Error::instance (); 00098 00099 if (e.get_code () == ok) return (false); 00100 else return (true); 00101 } |
|
Definition at line 142 of file cmt_error.cxx. References Error::get_code(), get_error_name(), Error::get_text(), and Error::instance(). Referenced by Cmt::parser().
00143 { 00144 Error& e = Error::instance (); 00145 00146 cerr << "CMT> Error: " << get_error_name (e.get_code ()) << " : " << e.get_text () << endl; 00147 } |
|