SALOME - SMESH
|
00001 // SALOME Utils : general SALOME's definitions and tools 00002 // 00003 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 00022 #if !defined( __SMESH_Exception_hxx__ ) 00023 #define __SMESH_Exception_hxx__ 00024 00025 # include <exception> 00026 # include <iostream> 00027 00028 #ifdef _DEBUG_ 00029 # define LOCALIZED(message) #message , __FILE__ , __LINE__ 00030 #else 00031 # define LOCALIZED(message) #message 00032 #endif 00033 00034 #include <SMESH_SMESH.hxx> 00035 00036 class SMESH_EXPORT SMESH_Exception : public std::exception 00037 { 00038 00039 private : 00040 SMESH_Exception( void ); 00041 00042 protected : 00043 const char* _text ; // non constant pointer but read only char variable 00044 00045 public : 00046 SMESH_Exception( const char *text, const char *fileName=0, const unsigned int lineNumber=0 ); 00047 SMESH_Exception( const SMESH_Exception &ex ); 00048 ~SMESH_Exception() throw (); 00049 friend std::ostream & operator<<( std::ostream &os , const SMESH_Exception &ex ); 00050 virtual const char *what( void ) const throw () ; 00051 } ; 00052 00053 00054 #endif /* #if !defined( __SMESH_Exception_hxx__ ) */