source: CMT/v1r25p20140131/source/cmt_error.h

Last change on this file was 664, checked in by rybkin, 10 years ago

merge -r 646:663 HEAD

  • 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// Modified by Grigory Rybkin
6// See the complete license in cmt_license.txt "http://www.cecill.info".
7//-----------------------------------------------------------
8
9#ifndef __cmt_error_h__
10#define __cmt_error_h__
11
12#include "cmt_std.h"
13#include "cmt_string.h"
14
15class CmtError
16{
17public:
18
19  typedef enum
20  {
21    ok,
22    warning,
23    symbol_not_found,
24    pattern_not_found,
25    constituent_not_found,
26    fragment_not_found,
27    language_not_found,
28    syntax_error,
29    command_not_implemented,
30    package_not_found,
31    path_not_found,
32    version_conflict,
33    file_access_error,
34    system_error,
35    configuration_error,
36    execution_error,
37    cannot_lock,
38    cannot_write_lock,
39    cannot_run_lock_command,
40    cannot_unlock,
41    cannot_run_unlock_command,
42    cannot_remove_lock,
43    conflicting_lock,
44    unknown_command,   
45    wrong_symbol_type,   
46    project_release_conflict,
47    execution_failed
48  } code;
49 
50 
51  static void clear ();
52  static code get_last_error_code ();
53  static bool has_pending_error ();
54  static const cmt_string& get_error_name (code error);
55  static void set (code error, const cmt_string& text, const int execution_error=0);
56
57  static int get_last_execution_error ();
58
59  static cmt_string get_last_error ();
60  static void print ();
61   
62};
63
64#endif
Note: See TracBrowser for help on using the repository browser.