source: CMT/v1r14p20031120/src/cmt_error.h @ 1

Last change on this file since 1 was 1, checked in by arnault, 19 years ago

Import all tags

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