exception-signal.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 
11 #include <stdarg.h>
12 
13 #include <cstdio>
14 
15 using namespace dynamicgraph;
16 
17 /* --------------------------------------------------------------------- */
18 /* --- CLASS ----------------------------------------------------------- */
19 /* --------------------------------------------------------------------- */
20 
21 const std::string ExceptionSignal::EXCEPTION_NAME = "Signal";
22 
24  const std::string &msg)
25  : ExceptionAbstract(errcode, msg) {}
26 
28  const std::string &msg, const char *format,
29  ...)
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
dynamicgraph::ExceptionSignal::ExceptionSignal
ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode, const std::string &msg="")
Definition: exception-signal.cpp:23
dynamicgraph::ExceptionSignal::ErrorCodeEnum
ErrorCodeEnum
Definition: exception-signal.h:21
dynamicgraph::ExceptionSignal::EXCEPTION_NAME
static const std::string EXCEPTION_NAME
Definition: exception-signal.h:31
exception-signal.h
dynamicgraph::ExceptionAbstract
Abstract root class for all dynamic-graph exceptions.
Definition: exception-abstract.h:31
dynamicgraph::ExceptionAbstract::message
std::string message
Error message (can be empty).
Definition: exception-abstract.h:108


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Fri Aug 2 2024 08:36:38