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

Last change on this file since 595 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
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,
[528]24    constituent_not_found,
25    fragment_not_found,
26    language_not_found,
[2]27    syntax_error,
28    command_not_implemented,
29    package_not_found,
30    path_not_found,
31    version_conflict,
32    file_access_error,
[496]33    configuration_error,
[2]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,
[3]41    conflicting_lock,
[363]42    unknown_command,   
[530]43    wrong_symbol_type,   
[363]44    project_release_conflict,
45    execution_failed
[2]46  } code;
[363]47 
48 
[2]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);
[363]53  static void set (code error, const cmt_string& text, const int execution_error=0);
54
55  static int get_last_execution_error ();
56
[2]57  static cmt_string get_last_error ();
58  static void print ();
[363]59   
[2]60};
61
62#endif
Note: See TracBrowser for help on using the repository browser.