Main Page
Namespaces
Classes
Files
File List
File Members
include
eigenpy
exception.hpp
Go to the documentation of this file.
1
/*
2
* Copyright 2014-2019, CNRS
3
* Copyright 2018-2019, INRIA
4
*/
5
6
#ifndef __eigenpy_exception_hpp__
7
#define __eigenpy_exception_hpp__
8
9
#include <exception>
10
#include <string>
11
12
#include "
eigenpy/fwd.hpp
"
13
14
namespace
eigenpy
15
{
16
/*
17
* Eigenpy exception. They can be catch with python (equivalent eigenpy.exception class).
18
*/
19
class
Exception
:
public
std::exception
20
{
21
public
:
22
Exception
() :
message
() {}
23
Exception
(
const
std::string & msg) :
message
(msg) {}
24
const
char
*
what
()
const
throw()
25
{
26
return
this->
getMessage
().c_str();
27
}
28
~Exception
() throw() {}
29
virtual
const
std::string &
getMessage
()
const
{
return
message
; }
30
std::string
copyMessage
()
const
{
return
getMessage
(); }
31
32
/* Call this static function to "enable" the translation of this C++ exception in Python. */
33
static
void
registerException
();
34
35
private
:
36
static
void
translateException
(
Exception
const
& e );
37
static
PyObject *
pyType
;
38
protected
:
39
std::string
message
;
40
};
41
42
}
// namespace eigenpy
43
44
#endif // ifndef __eigenpy_exception_hpp__
eigenpy::Exception::message
std::string message
Definition:
exception.hpp:39
fwd.hpp
eigenpy::Exception::copyMessage
std::string copyMessage() const
Definition:
exception.hpp:30
eigenpy::Exception::~Exception
~Exception()
Definition:
exception.hpp:28
eigenpy
Definition:
angle-axis.hpp:13
eigenpy::Exception::Exception
Exception()
Definition:
exception.hpp:22
eigenpy::Exception::Exception
Exception(const std::string &msg)
Definition:
exception.hpp:23
eigenpy::Exception
Definition:
exception.hpp:19
eigenpy::Exception::getMessage
virtual const std::string & getMessage() const
Definition:
exception.hpp:29
eigenpy::Exception::translateException
static void translateException(Exception const &e)
Definition:
exception.cpp:16
eigenpy::Exception::pyType
static PyObject * pyType
Definition:
exception.hpp:37
eigenpy::Exception::what
const char * what() const
Definition:
exception.hpp:24
eigenpy::Exception::registerException
static void registerException()
Definition:
exception.cpp:23
eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Sat Apr 17 2021 02:37:59