src
exception
exception-dynamic.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/exception-dynamic.hh
>
14
15
using namespace
dynamicgraph::sot
;
16
17
/* --------------------------------------------------------------------- */
18
/* --- CLASS ----------------------------------------------------------- */
19
/* --------------------------------------------------------------------- */
20
21
const
std::string
ExceptionDynamic::EXCEPTION_NAME
=
"Dynamic"
;
22
23
ExceptionDynamic::ExceptionDynamic
(
24
const
ExceptionDynamic::ErrorCodeEnum
&errcode,
const
std::string &msg)
25
:
ExceptionAbstract
(errcode, msg) {}
26
27
ExceptionDynamic::ExceptionDynamic
(
28
const
ExceptionDynamic::ErrorCodeEnum
&errcode,
const
std::string &msg,
29
const
char
*format, ...)
30
:
ExceptionAbstract
(errcode, msg) {
31
va_list
args
;
32
va_start(args, format);
33
34
const
unsigned
int
SIZE = 256;
35
char
buffer[SIZE];
36
vsnprintf(buffer, SIZE, format, args);
37
38
message
+= buffer;
39
40
va_end(args);
41
}
42
43
/*
44
* Local variables:
45
* c-basic-offset: 2
46
* End:
47
*/
dynamicgraph::ExceptionAbstract::message
std::string message
exception-dynamic.hh
dynamicgraph::sot::ExceptionDynamic::ExceptionDynamic
ExceptionDynamic(const ExceptionDynamic::ErrorCodeEnum &errcode, const std::string &msg="")
Definition:
exception-dynamic.cpp:23
dynamicgraph::sot::ExceptionDynamic::ErrorCodeEnum
ErrorCodeEnum
Definition:
exception-dynamic.hh:33
dynamicgraph::sot::ExceptionDynamic::EXCEPTION_NAME
static const std::string EXCEPTION_NAME
Definition:
exception-dynamic.hh:44
args
args
dynamicgraph::ExceptionAbstract
dynamicgraph::sot
sot-core
Author(s): Olivier Stasse, ostasse@laas.fr
autogenerated on Wed Jun 21 2023 02:51:26