glucat
0.8.4
glucat
errors.h
Go to the documentation of this file.
1
#ifndef _GLUCAT_ERRORS_H
2
#define _GLUCAT_ERRORS_H
3
/***************************************************************************
4
GluCat : Generic library of universal Clifford algebra templates
5
errors.h : Declare error classes and functions
6
-------------------
7
begin : Sun 2001-12-09
8
copyright : (C) 2001-2012 by Paul C. Leopardi
9
***************************************************************************
10
11
This library is free software: you can redistribute it and/or modify
12
it under the terms of the GNU Lesser General Public License as published
13
by the Free Software Foundation, either version 3 of the License, or
14
(at your option) any later version.
15
16
This library is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU Lesser General Public License for more details.
20
21
You should have received a copy of the GNU Lesser General Public License
22
along with this library. If not, see <http://www.gnu.org/licenses/>.
23
24
***************************************************************************
25
This library is based on a prototype written by Arvind Raja and was
26
licensed under the LGPL with permission of the author. See Arvind Raja,
27
"Object-oriented implementations of Clifford algebras in C++: a prototype",
28
in Ablamowicz, Lounesto and Parra (eds.)
29
"Clifford algebras with numeric and symbolic computations", Birkhauser, 1996.
30
***************************************************************************
31
See also Arvind Raja's original header comments in glucat.h
32
***************************************************************************/
33
34
#include <string>
35
#include <exception>
36
#include <stdexcept>
37
38
namespace
glucat
39
{
41
class
glucat_error :
public
std::logic_error
42
{
43
public
:
44
glucat_error
(
const
std::string& context,
const
std::string& msg)
45
: logic_error(msg),
name
(context)
46
{ }
47
~glucat_error
() throw()
48
{ }
49
virtual
const
std::string
heading
()
const
throw() =0;
50
virtual const
std
::
string
classname
() const throw() =0;
51
virtual
void
print_error_msg
() const =0;
52
std
::
string
name
;
53
};
54
56
template< class Class_T >
57
class error : public
glucat_error
58
{
59
public
:
60
error(
const
std::string& msg);
61
error(
const
std::string& context,
const
std::string& msg);
62
virtual
const
std::string
heading
()
const
throw();
63
virtual const
std
::
string
classname
() const throw();
64
virtual
void
print_error_msg
() const;
65
};
66
}
67
#endif // _GLUCAT_ERRORS_H
glucat::glucat_error::glucat_error
glucat_error(const std::string &context, const std::string &msg)
Definition:
errors.h:102
glucat::glucat_error::classname
virtual const std::string classname() const =0
glucat::glucat_error::name
std::string name
Definition:
errors.h:110
glucat::glucat_error::heading
virtual const std::string heading() const =0
std
Definition:
framed_multi.h:371
glucat::glucat_error::print_error_msg
virtual void print_error_msg() const =0
glucat
Definition:
clifford_algebra.h:39
glucat::glucat_error::~glucat_error
~glucat_error()
Definition:
errors.h:105
Generated on Sun Jul 12 2020 00:00:00 for glucat by
1.8.18