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

CmtError Class Reference

#include <cmt_error.h>

List of all members.

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_stringget_error_name (code error)
void set (code error, const cmt_string &text)
cmt_string get_last_error ()
void print ()


Member Enumeration Documentation

enum CmtError::code
 

Enumeration values:
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 

Definition at line 17 of file cmt_error.h.

Referenced by get_last_error_code().


Member Function Documentation

void CmtError::clear  )  [static]
 

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 }

const cmt_string & CmtError::get_error_name code  error  )  [static]
 

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 }

cmt_string CmtError::get_last_error  )  [static]
 

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 }

CmtError::code CmtError::get_last_error_code  )  [static]
 

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 }

bool CmtError::has_pending_error  )  [static]
 

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 }

void CmtError::print  )  [static]
 

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 }

void CmtError::set code  error,
const cmt_string text
[static]
 

Definition at line 120 of file cmt_error.cxx.

References Error::instance(), and Error::set().

Referenced by KwdDefault::action(), KwdSetupStrategy::action(), KwdBuildStrategy::action(), ApplyPattern::action(), Project::add(), ProjectFactory::create_project(), CMTPathManager::do_add_cmt_path(), Cmt::do_broadcast(), Cmt::do_build_constituent_makefile(), Cmt::do_build_constituents_makefile(), Cmt::do_build_dependencies(), Cmt::do_build_library_links(), Cmt::do_build_make_setup(), Cmt::do_build_msdev(), Cmt::do_build_os9_makefile(), Cmt::do_build_prototype(), Cmt::do_build_readme(), Cmt::do_build_tag_makefile(), Cmt::do_build_triggers(), Cmt::do_build_vsnet(), Cmt::do_build_windefs(), Cmt::do_config(), Cmt::do_do(), SyntaxParser::do_parse_words(), Cmt::do_remove_library_links(), Cmt::do_show_action(), Cmt::do_show_macro(), Cmt::load(), CmtLock::lock(), Cmt::parser(), Cmt::reach_current_package(), Pattern::show(), Use::show_all(), and CmtLock::unlock().

00121 {
00122   Error& e = Error::instance ();
00123 
00124   e.set (error, text);
00125 }


The documentation for this class was generated from the following files:
Generated on Mon May 2 10:25:32 2005 for CMT by doxygen 1.3.5