1 // Copyright (C) 2007-2014 CEA/DEN, EDF R&D, OPEN CASCADE
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : CalciumException.hxx
21 // Author : Eric Fayolle (EDF)
23 // Modified by : $LastChangedBy$
24 // Date : $LastChangedDate: 2007-02-06 17:20:28 +0100 (mar, 06 fév 2007) $
27 #ifndef CALCIUM_EXCEPTION_HXX
28 #define CALCIUM_EXCEPTION_HXX
30 #if defined(__CONST_H) || defined(__CALCIUM_H)
31 #error "The header CalciumException.hxx must be included before calcium.h"
34 #include "DSC_Exception.hxx"
35 #include "CalciumTypes.hxx"
38 struct CalciumException : public DSC_Exception {
40 CalciumException( const CalciumTypes::InfoType info,
41 const std::string & text,
43 const unsigned int lineNumber,
44 const char *funcName):
45 DSC_Exception(text,fileName,lineNumber,funcName),
46 _info(info),_exceptionName("CalciumException")
50 CalciumException( const CalciumTypes::InfoType info,
51 const std::string & text ):
52 DSC_Exception(text),_info(info),_exceptionName("CalciumException")
55 CalciumException(CalciumTypes::InfoType info, const DSC_Exception & ex ):
56 DSC_Exception(ex),_info(info),_exceptionName("CalciumException")
59 virtual ~CalciumException() throw() {};
60 CalciumTypes::InfoType getInfo() const { return _info;}
61 void setInfo(CalciumTypes::InfoType info) {_info=info;}
62 virtual const std::string & getExceptionName() const {return _exceptionName;};
65 CalciumTypes::InfoType _info;
66 std::string _exceptionName;
70 #endif /* CALCIUM_EXCEPTION_HXX */