source: CMT/v1r10p20011126/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: 849 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    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.