Rev | Line | |
---|
[1] | 1 | #ifndef __cmt_error_h__ |
---|
| 2 | #define __cmt_error_h__ |
---|
| 3 | |
---|
| 4 | #include "cmt_std.h" |
---|
| 5 | #include "cmt_string.h" |
---|
| 6 | |
---|
| 7 | class CmtError |
---|
| 8 | { |
---|
| 9 | public: |
---|
| 10 | |
---|
| 11 | typedef enum |
---|
| 12 | { |
---|
| 13 | ok, |
---|
| 14 | symbol_not_found, |
---|
| 15 | pattern_not_found, |
---|
| 16 | syntax_error, |
---|
| 17 | command_not_implemented, |
---|
| 18 | package_not_found, |
---|
| 19 | path_not_found, |
---|
| 20 | version_conflict, |
---|
| 21 | file_access_error, |
---|
| 22 | execution_error, |
---|
| 23 | cannot_lock, |
---|
| 24 | cannot_write_lock, |
---|
| 25 | cannot_run_lock_command, |
---|
| 26 | cannot_unlock, |
---|
| 27 | cannot_run_unlock_command, |
---|
| 28 | cannot_remove_lock, |
---|
| 29 | conflicting_lock |
---|
| 30 | } code; |
---|
| 31 | |
---|
| 32 | static void clear (); |
---|
| 33 | static code get_last_error_code (); |
---|
| 34 | static bool has_pending_error (); |
---|
| 35 | static const cmt_string& get_error_name (code error); |
---|
| 36 | static void set (code error, const cmt_string& text); |
---|
| 37 | static cmt_string get_last_error (); |
---|
| 38 | static void print (); |
---|
| 39 | }; |
---|
| 40 | |
---|
| 41 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.