source: CMT/v1r20p20090520/source/cmt_error.h @ 595

Last change on this file since 595 was 496, checked in by rybkin, 15 years ago

See C.L. 391

  • Property svn:eol-style set to native
File size: 1.3 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    syntax_error,
25    command_not_implemented,
26    package_not_found,
27    path_not_found,
28    version_conflict,
29    file_access_error,
30    configuration_error,
31    execution_error,
32    cannot_lock,
33    cannot_write_lock,
34    cannot_run_lock_command,
35    cannot_unlock,
36    cannot_run_unlock_command,
37    cannot_remove_lock,
38    conflicting_lock,
39    unknown_command,   
40    project_release_conflict,
41    execution_failed
42  } code;
43 
44 
45  static void clear ();
46  static code get_last_error_code ();
47  static bool has_pending_error ();
48  static const cmt_string& get_error_name (code error);
49  static void set (code error, const cmt_string& text, const int execution_error=0);
50
51  static int get_last_execution_error ();
52
53  static cmt_string get_last_error ();
54  static void print ();
55   
56};
57
58#endif
Note: See TracBrowser for help on using the repository browser.