glucat
0.8.4
glucat
errors_imp.h
Go to the documentation of this file.
1
#ifndef _GLUCAT_ERRORS_IMP_H
2
#define _GLUCAT_ERRORS_IMP_H
3
/***************************************************************************
4
GluCat : Generic library of universal Clifford algebra templates
5
errors_imp.h : Define error functions
6
-------------------
7
begin : Sun 2001-12-20
8
copyright : (C) 2001-2007 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
namespace
glucat
35
{
37
template
<
class
Class_T >
38
error<Class_T>::
39
error
(
const
std::string& msg)
40
:
glucat_error
(Class_T::classname(), msg)
41
{ }
42
43
template
<
class
Class_T >
44
error<Class_T>::
45
error
(
const
std::string& context,
const
std::string& msg)
46
:
glucat_error
(context, msg)
47
{ }
48
49
template
<
class
Class_T >
50
const
std::string
51
error<Class_T>::
52
heading
()
const
throw()
53
{
return
"Error in glucat::"
; }
54
55
template
<
class
Class_T >
56
const
std::string
57
error<Class_T>::
58
classname
()
const
throw()
59
{
return
name; }
60
61
template
<
class
Class_T >
62
void
63
error<Class_T>::
64
print_error_msg
()
const
65
{ std::cerr << heading() << classname() << std::endl << what() << std::endl; }
66
}
67
#endif // _GLUCAT_ERRORS_IMP_H
glucat::error::heading
virtual const std::string heading() const
Definition:
errors_imp.h:52
glucat::error::classname
virtual const std::string classname() const
Definition:
errors_imp.h:58
glucat::error::error
error(const std::string &msg)
Specific exception class.
Definition:
errors_imp.h:39
glucat::glucat_error
Abstract exception class.
Definition:
errors.h:42
glucat
Definition:
clifford_algebra.h:39
glucat::error::print_error_msg
virtual void print_error_msg() const
Definition:
errors_imp.h:64
Generated on Sun Jul 12 2020 00:00:00 for glucat by
1.8.20