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  */
std::string message
Error message (can be empty).
ExceptionTraces(const ExceptionTraces::ErrorCodeEnum &errcode, const std::string &msg="")
static const std::string EXCEPTION_NAME
Abstract root class for all dynamic-graph exceptions.


dynamic-graph
Author(s): Nicolas Mansard, Olivier Stasse
autogenerated on Sun Jun 25 2023 02:06:03