Main Page ? Class Hierarchy ? Compound List ? File List ? Compound Members ? File Members ?

CmtError Class Reference

#include

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
}

Static Public Methods

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 ()

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?

Definition at line 17 of file cmt_error.h.

Referenced by Error::get_code(), get_last_error_code(), Error::get_name(), and Error::set().


Member Function Documentation

void CmtError::clear (? ? )? [static]
?

Definition at line 85 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().

00086 {
00087   Error& e = Error::instance ();
00088 
00089   e.clear ();
00090 }

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

Definition at line 110 of file cmt_error.cxx.

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

Referenced by get_last_error(), and print().

00111 {
00112   Error& e = Error::instance ();
00113 
00114   return (e.get_name (error));
00115 }

cmt_string CmtError::get_last_error (? ? )? [static]
?

Definition at line 126 of file cmt_error.cxx.

References Error::get_code(), get_error_name(), Error::get_text(), and Error::instance().

Referenced by Cmt::configure().

00127 {
00128   Error& e = Error::instance ();
00129 
00130   cmt_string result;
00131 
00132   result = get_error_name (e.get_code ());
00133   result += " : ";
00134   result += e.get_text ();
00135 
00136   return (result);
00137 }

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

Definition at line 102 of file cmt_error.cxx.

References code, Error::get_code(), and Error::instance().

Referenced by Cmt::parser().

00103 {
00104   Error& e = Error::instance ();
00105 
00106   return (e.get_code ());
00107 }

bool CmtError::has_pending_error (? ? )? [static]
?

Definition at line 93 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().

00094 {
00095   Error& e = Error::instance ();
00096 
00097   if (e.get_code () == ok) return (false);
00098   else return (true);
00099 }

void CmtError::print (? ? )? [static]
?

Definition at line 140 of file cmt_error.cxx.

References Error::get_code(), get_error_name(), Error::get_text(), and Error::instance().

Referenced by Cmt::parser().

00141 {
00142   Error& e = Error::instance ();
00143 
00144   cerr << "CMT> Error: " << get_error_name (e.get_code ()) << " : " << e.get_text () << endl;
00145 }

void CmtError::set (? code? ? error,
const cmt_string &? ? text
)? [static]
?

Definition at line 118 of file cmt_error.cxx.

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

Referenced by KwdDefault::action(), KwdSetupStrategy::action(), KwdBuildStrategy::action(), ApplyPattern::action(), CmtSystem::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().

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

The documentation for this class was generated from the following files:
Generated on Wed Dec 1 15:24:35 2004 for CMT by 1.2.18