SALOME - SMESH
SMESH_Exception.hxx
Go to the documentation of this file.
1 // SALOME Utils : general SALOME's definitions and tools
2 //
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 
22 #if !defined( __SMESH_Exception_hxx__ )
23 #define __SMESH_Exception_hxx__
24 
25 # include <exception>
26 # include <iostream>
27 
28 #ifdef _DEBUG_
29 # define LOCALIZED(message) #message , __FILE__ , __LINE__
30 #else
31 # define LOCALIZED(message) #message
32 #endif
33 
34 #include <SMESH_SMESH.hxx>
35 
36 class SMESH_EXPORT SMESH_Exception : public std::exception
37 {
38 
39 private :
40  SMESH_Exception( void );
41 
42 protected :
43  const char* _text ; // non constant pointer but read only char variable
44 
45 public :
46  SMESH_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 );
47  SMESH_Exception( const SMESH_Exception &ex );
48  ~SMESH_Exception() throw ();
49  friend std::ostream & operator<<( std::ostream &os , const SMESH_Exception &ex );
50  virtual const char *what( void ) const throw () ;
51 } ;
52 
53 
54 #endif /* #if !defined( __SMESH_Exception_hxx__ ) */
STL namespace.
#define SMESH_EXPORT
Definition: SMESH_SMESH.hxx:36
const char * _text