source: CMT/v1r23/source/cmt_error.h

Last change on this file was 530, checked in by rybkin, 15 years ago

See C.L. 417

  • Property svn:eol-style set to native
File size: 1.4 KB
Line 
1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
4// Modified by garonne@lal.in2p3.fr
5// See the complete license in cmt_license.txt "http://www.cecill.info".
6//-----------------------------------------------------------
7
8#ifndef __cmt_error_h__
9#define __cmt_error_h__
10
11#include "cmt_std.h"
12#include "cmt_string.h"
13
14class CmtError
15{
16public:
17
18  typedef enum
19  {
20    ok,
21    warning,
22    symbol_not_found,
23    pattern_not_found,
24    constituent_not_found,
25    fragment_not_found,
26    language_not_found,
27    syntax_error,
28    command_not_implemented,
29    package_not_found,
30    path_not_found,
31    version_conflict,
32    file_access_error,
33    configuration_error,
34    execution_error,
35    cannot_lock,
36    cannot_write_lock,
37    cannot_run_lock_command,
38    cannot_unlock,
39    cannot_run_unlock_command,
40    cannot_remove_lock,
41    conflicting_lock,
42    unknown_command,   
43    wrong_symbol_type,   
44    project_release_conflict,
45    execution_failed
46  } code;
47 
48 
49  static void clear ();
50  static code get_last_error_code ();
51  static bool has_pending_error ();
52  static const cmt_string& get_error_name (code error);
53  static void set (code error, const cmt_string& text, const int execution_error=0);
54
55  static int get_last_execution_error ();
56
57  static cmt_string get_last_error ();
58  static void print ();
59   
60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.