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

Last change on this file since 363 was 363, checked in by garonne, 17 years ago

see C.L 322

  • Property svn:eol-style set to native
File size: 1.3 KB
RevLine 
[2]1//-----------------------------------------------------------
2// Copyright Christian Arnault LAL-Orsay CNRS
3// arnault@lal.in2p3.fr
[363]4// Modified by garonne@lal.in2p3.fr
[2]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    execution_error,
31    cannot_lock,
32    cannot_write_lock,
33    cannot_run_lock_command,
34    cannot_unlock,
35    cannot_run_unlock_command,
36    cannot_remove_lock,
[3]37    conflicting_lock,
[363]38    unknown_command,   
39    project_release_conflict,
40    execution_failed
[2]41  } code;
[363]42 
43 
[2]44  static void clear ();
45  static code get_last_error_code ();
46  static bool has_pending_error ();
47  static const cmt_string& get_error_name (code error);
[363]48  static void set (code error, const cmt_string& text, const int execution_error=0);
49
50  static int get_last_execution_error ();
51
[2]52  static cmt_string get_last_error ();
53  static void print ();
[363]54   
[2]55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.