Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
i
j
l
m
n
o
p
q
r
s
t
u
v
w
Functions
_
a
b
c
d
f
g
i
j
l
m
o
p
q
r
s
t
u
v
Variables
_
a
b
c
d
e
f
g
i
j
l
m
n
p
r
s
u
v
w
Typedefs
c
e
f
i
m
q
r
s
v
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Typedefs
b
d
e
f
k
l
m
s
t
v
Enumerations
Enumerator
a
b
c
d
e
f
g
i
j
k
m
n
o
p
r
s
t
u
Related Functions
Files
File List
File Members
All
_
a
b
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
u
v
Functions
b
c
d
e
f
g
i
l
m
o
p
r
s
t
u
Variables
Typedefs
c
d
e
f
k
r
s
t
Enumerations
Enumerator
Macros
_
a
b
c
d
e
f
i
l
m
n
o
p
r
s
t
v
src
exception
exception-factory.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2010,
3
* François Bleibel,
4
* Olivier Stasse,
5
*
6
* CNRS/AIST
7
*
8
*/
9
10
#include <stdarg.h>
11
12
#include <cstdio>
13
#include <
sot/core/debug.hh
>
14
#include <
sot/core/exception-factory.hh
>
15
16
using namespace
dynamicgraph::sot
;
17
18
/* --------------------------------------------------------------------- */
19
/* --- CLASS ----------------------------------------------------------- */
20
/* --------------------------------------------------------------------- */
21
22
const
std::string
ExceptionFactory::EXCEPTION_NAME
=
"Factory"
;
23
24
ExceptionFactory::ExceptionFactory
(
25
const
ExceptionFactory::ErrorCodeEnum
&errcode,
const
std::string &msg)
26
:
ExceptionAbstract
(errcode, msg) {
27
sotDEBUGF
(15,
"Created with message <%s>."
, msg.c_str());
28
sotDEBUG
(1) <<
"Created with message <%s>."
<< msg << std::endl;
29
}
30
31
ExceptionFactory::ExceptionFactory
(
32
const
ExceptionFactory::ErrorCodeEnum
&errcode,
const
std::string &msg,
33
const
char
*format, ...)
34
:
ExceptionAbstract
(errcode, msg) {
35
va_list
args
;
36
va_start(
args
, format);
37
38
const
std::size_t SIZE = 256;
39
char
buffer[SIZE];
40
vsnprintf(buffer, SIZE, format,
args
);
41
42
sotDEBUG
(15) <<
"Created "
43
<<
" with message <"
<< msg <<
"> and buffer <"
<< buffer
44
<<
">. "
<< std::endl;
45
46
message
+= buffer;
47
48
va_end(
args
);
49
50
sotDEBUG
(1) <<
"Throw exception "
<<
EXCEPTION_NAME
<<
"[#"
<< errcode
51
<<
"]: "
52
<<
"<"
<<
message
<<
">."
<< std::endl;
53
}
54
55
/*
56
* Local variables:
57
* c-basic-offset: 2
58
* End:
59
*/
dynamicgraph::sot::sotDEBUGF
void sotDEBUGF(const size_type, const char *,...)
Definition:
debug.hh:182
debug.hh
args
args
dynamicgraph::sot::ExceptionFactory::ErrorCodeEnum
ErrorCodeEnum
Definition:
exception-factory.hh:33
dynamicgraph::ExceptionAbstract
dynamicgraph::ExceptionFactory::EXCEPTION_NAME
static const std::string EXCEPTION_NAME
dynamicgraph::ExceptionFactory::ExceptionFactory
ExceptionFactory(const ExceptionFactory::ErrorCodeEnum &errcode, const std::string &msg, const char *format,...)
exception-factory.hh
dynamicgraph::ExceptionAbstract::message
std::string message
dynamicgraph::sot
sotDEBUG
#define sotDEBUG(level)
Definition:
debug.hh:168
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Tue Oct 24 2023 02:26:31