#ifndef __cmt_error_h__ #define __cmt_error_h__ #include "cmt_std.h" #include "cmt_string.h" class CmtError { public: typedef enum { ok, 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 } code; static void clear (); static code get_last_error_code (); static bool has_pending_error (); static const cmt_string& get_error_name (code error); static void set (code error, const cmt_string& text); static cmt_string get_last_error (); static void print (); }; #endif