GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/catkin/dg_control/dynamic_graph_manager/src/exception/exception-dynamic.cpp Lines: 2 11 18.2 %
Date: 2020-04-15 11:50:02 Branches: 3 12 25.0 %

Line Branch Exec Source
1
/**
2
 * @file exception-dynamic.cpp
3
 * @author Maximilien Naveau (maximilien.naveau@gmail.com)
4
 * @license License BSD-3-Clause
5
 * @copyright Copyright (c) 2019, New York University and Max Planck Gesellschaft.
6
 * @date 2019-05-22
7
 */
8
9
#include <dynamic_graph_manager/exception/exception-dynamic.hh>
10
#include <stdarg.h>
11
#include <cstdio>
12
13
using namespace dynamic_graph;
14
15
/* --------------------------------------------------------------------- */
16
/* --- CLASS ----------------------------------------------------------- */
17
/* --------------------------------------------------------------------- */
18
19
4
const std::string ExceptionDynamic::EXCEPTION_NAME = "Dynamic";
20
21
ExceptionDynamic::
22
ExceptionDynamic ( const ExceptionDynamic::ErrorCodeEnum& errcode,
23
		     const std::string & msg )
24
  :ExceptionAbstract(errcode,msg)
25
{
26
}
27
28
ExceptionDynamic::
29
ExceptionDynamic ( const ExceptionDynamic::ErrorCodeEnum& errcode,
30
			const std::string & msg,const char* format, ... )
31
  :ExceptionAbstract(errcode,msg)
32
{
33
  va_list args;
34
  va_start(args,format);
35
36
  const unsigned int SIZE = 256;
37
  char  buffer[SIZE];
38
  vsnprintf(buffer,SIZE,format,args);
39
40
  message += buffer;
41
42
  va_end(args);
43

12
}
44
45
46
47
/*
48
 * Local variables:
49
 * c-basic-offset: 2
50
 * End:
51
 */