exception-traces.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 /* --- CLASS ----------------------------------------------------------- */
18 /* --------------------------------------------------------------------- */
19 
20 const std::string ExceptionTraces::EXCEPTION_NAME = "Traces";
21 
23  const std::string &msg)
24  : ExceptionAbstract(errcode, msg) {}
25 
27  const std::string &msg, const char *format,
28  ...)
29  : ExceptionAbstract(errcode, msg) {
30  va_list args;
31  va_start(args, format);
32 
33  const unsigned int SIZE = 256;
34  char buffer[SIZE];
35  vsnprintf(buffer, SIZE, format, args);
36 
37  message += buffer;
38 
39  va_end(args);
40 }
41 
42 /*
43  * Local variables:
44  * c-basic-offset: 2
45  * End:
46  */
dynamicgraph::ExceptionTraces::ExceptionTraces
ExceptionTraces(const ExceptionTraces::ErrorCodeEnum &errcode, const std::string &msg="")
Definition: exception-traces.cpp:22
dynamicgraph::ExceptionTraces::EXCEPTION_NAME
static const std::string EXCEPTION_NAME
Definition: exception-traces.h:22
dynamicgraph
dynamicgraph::ExceptionAbstract
Abstract root class for all dynamic-graph exceptions.
Definition: exception-abstract.h:31
dynamicgraph::ExceptionTraces::ErrorCodeEnum
ErrorCodeEnum
Definition: exception-traces.h:20
dynamicgraph::ExceptionAbstract::message
std::string message
Error message (can be empty).
Definition: exception-abstract.h:108
exception-traces.h


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