Salome HOME
Version ok de MED avec MEDGUI.
[modules/med.git] / src / MEDMEM / MEDMEM_Exception.hxx
1 /*
2  File MedException.hxx
3  $Header$
4 */
5
6 #ifndef MEDEXCEPTION_HXX
7 #define MEDEXCEPTION_HXX
8
9 using namespace std;
10
11 #include <exception>
12 #include <iostream>
13
14 #ifndef LOCALIZED
15 #define LOCALIZED(message) message , __FILE__ , __LINE__
16 #endif
17
18 #define MED_EXCEPTION MEDEXCEPTION
19 class MEDEXCEPTION : public exception
20 {
21 private :
22   MEDEXCEPTION(void);
23
24 protected :
25   const char* _text ;
26
27 public :
28   MEDEXCEPTION(const char *text, const char *fileName=0, 
29                const unsigned int lineNumber=0 );
30   MEDEXCEPTION(const MEDEXCEPTION &ex );
31   ~MEDEXCEPTION() throw ();
32   friend ostream & operator<< (ostream &os, const MEDEXCEPTION &ex );
33   virtual const char *what(void) const throw () ;
34 } ;
35
36
37 class MED_DRIVER_NOT_FOUND_EXCEPTION : public MEDEXCEPTION
38 {
39 private :
40   MED_DRIVER_NOT_FOUND_EXCEPTION(void);
41
42 public :
43   MED_DRIVER_NOT_FOUND_EXCEPTION(const char *text, const char *fileName=0, 
44                                  const unsigned int lineNumber=0 );
45   MED_DRIVER_NOT_FOUND_EXCEPTION(const MED_DRIVER_NOT_FOUND_EXCEPTION &ex );
46   ~MED_DRIVER_NOT_FOUND_EXCEPTION() throw();
47
48 };
49
50 #endif  /* MEDEXCEPTION_HXX */