]> SALOME platform Git repositories - modules/med.git/blob - src/MEDMEM/MEDMEM_Exception.hxx
Salome HOME
adding some castem mesh file to test the GIBI driver of Med Memory.
[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
20 /*!
21   Class used to throws exception.\n
22   Inherits from public exception.
23 */
24 //--------------------------------------//
25   class MEDEXCEPTION : public exception
26 //--------------------------------------//
27 {
28 private :
29   MEDEXCEPTION(void);
30
31 protected :
32   const char* _text ;
33
34 public :
35   MEDEXCEPTION(const char *text, const char *fileName=0, 
36                const unsigned int lineNumber=0 );
37   MEDEXCEPTION(const MEDEXCEPTION &ex );
38   ~MEDEXCEPTION() throw ();
39   friend ostream & operator<< (ostream &os, const MEDEXCEPTION &ex );
40   virtual const char *what(void) const throw () ;
41 } ;
42
43
44 //---------------------------------------------------------//
45 class MED_DRIVER_NOT_FOUND_EXCEPTION : public MEDEXCEPTION
46 //---------------------------------------------------------//
47 {
48 private :
49   MED_DRIVER_NOT_FOUND_EXCEPTION(void);
50
51 public :
52   MED_DRIVER_NOT_FOUND_EXCEPTION(const char *text, const char *fileName=0, 
53                                  const unsigned int lineNumber=0 );
54   MED_DRIVER_NOT_FOUND_EXCEPTION(const MED_DRIVER_NOT_FOUND_EXCEPTION &ex );
55   ~MED_DRIVER_NOT_FOUND_EXCEPTION() throw();
56
57 };
58
59 #endif  /* MEDEXCEPTION_HXX */