Version: 9.16.0
CalciumException.hxx
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
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.
7//
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.
12//
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
16//
17// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18//
19
20// File : CalciumException.hxx
21// Author : Eric Fayolle (EDF)
22// Module : KERNEL
23// Modified by : $LastChangedBy$
24// Date : $LastChangedDate: 2007-02-06 17:20:28 +0100 (mar, 06 fév 2007) $
25// Id : $Id$
26//
27#ifndef CALCIUM_EXCEPTION_HXX
28#define CALCIUM_EXCEPTION_HXX
29
30#if defined(__CONST_H) || defined(__CALCIUM_H)
31#error "The header CalciumException.hxx must be included before calcium.h"
32#endif
33
34#include "DSC_Exception.hxx"
35#include "CalciumTypes.hxx"
36#include <string>
37
39
41 const std::string & text,
42 const char *fileName,
43 const unsigned int lineNumber,
44 const char *funcName):
45 DSC_Exception(text,fileName,lineNumber,funcName),
46 _info(info),_exceptionName("CalciumException")
47 {};
48
49
51 const std::string & text ):
52 DSC_Exception(text),_info(info),_exceptionName("CalciumException")
53 {};
54
56 DSC_Exception(ex),_info(info),_exceptionName("CalciumException")
57 {};
58
59 virtual ~CalciumException() noexcept {};
62 virtual const std::string & getExceptionName() const {return _exceptionName;};
63
64protected:
66 std::string _exceptionName;
67};
68
69
70#endif /* CALCIUM_EXCEPTION_HXX */
int InfoType
Definition: CalciumTypes.hxx:66
Definition: CalciumException.hxx:38
virtual const std::string & getExceptionName() const
Definition: CalciumException.hxx:62
std::string _exceptionName
Definition: CalciumException.hxx:66
CalciumTypes::InfoType _info
Definition: CalciumException.hxx:65
CalciumTypes::InfoType getInfo() const
Definition: CalciumException.hxx:60
CalciumException(const CalciumTypes::InfoType info, const std::string &text)
Definition: CalciumException.hxx:50
virtual ~CalciumException() noexcept
Definition: CalciumException.hxx:59
CalciumException(const CalciumTypes::InfoType info, const std::string &text, const char *fileName, const unsigned int lineNumber, const char *funcName)
Definition: CalciumException.hxx:40
void setInfo(CalciumTypes::InfoType info)
Definition: CalciumException.hxx:61
CalciumException(CalciumTypes::InfoType info, const DSC_Exception &ex)
Definition: CalciumException.hxx:55
Definition: DSC_Exception.hxx:94