source: CMT/v1r19/source/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: 1.1 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// See the complete license in cmt_license.txt "http://www.cecill.info".
5//-----------------------------------------------------------
6
7#ifndef __cmt_error_h__
8#define __cmt_error_h__
9
10#include "cmt_std.h"
11#include "cmt_string.h"
12
13class CmtError
14{
15public:
16
17  typedef enum
18  {
19    ok,
20    warning,
21    symbol_not_found,
22    pattern_not_found,
23    syntax_error,
24    command_not_implemented,
25    package_not_found,
26    path_not_found,
27    version_conflict,
28    file_access_error,
29    execution_error,
30    cannot_lock,
31    cannot_write_lock,
32    cannot_run_lock_command,
33    cannot_unlock,
34    cannot_run_unlock_command,
35    cannot_remove_lock,
36    conflicting_lock
37  } code;
38
39  static void clear ();
40  static code get_last_error_code ();
41  static bool has_pending_error ();
42  static const cmt_string& get_error_name (code error);
43  static void set (code error, const cmt_string& text);
44  static cmt_string get_last_error ();
45  static void print ();
46};
47
48#endif
Note: See TracBrowser for help on using the repository browser.