source: CMT/HEAD/source/cmt_error.h @ 598

Last change on this file since 598 was 598, checked in by rybkin, 12 years ago

See C.L. 475

  • 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    system_error,
34    configuration_error,
35    execution_error,
36    cannot_lock,
37    cannot_write_lock,
38    cannot_run_lock_command,
39    cannot_unlock,
40    cannot_run_unlock_command,
41    cannot_remove_lock,
42    conflicting_lock,
43    unknown_command,   
44    wrong_symbol_type,   
45    project_release_conflict,
46    execution_failed
47  } code;
48 
49 
50  static void clear ();
51  static code get_last_error_code ();
52  static bool has_pending_error ();
53  static const cmt_string& get_error_name (code error);
54  static void set (code error, const cmt_string& text, const int execution_error=0);
55
56  static int get_last_execution_error ();
57
58  static cmt_string get_last_error ();
59  static void print ();
60   
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.