GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: src/catkin/dg_control/dynamic_graph_manager/src/exception/exception-task.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-task.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-task.hh>
10
#include <stdarg.h>
11
#include <cstdio>
12
13
14
using namespace dynamic_graph;
15
16
/* --------------------------------------------------------------------- */
17
/* --- CLASS ----------------------------------------------------------- */
18
/* --------------------------------------------------------------------- */
19
20
4
const std::string ExceptionTask::EXCEPTION_NAME = "Task";
21
22
ExceptionTask::
23
ExceptionTask ( const ExceptionTask::ErrorCodeEnum& errcode,
24
		   const std::string & msg )
25
  :ExceptionAbstract(errcode,msg)
26
{
27
}
28
29
ExceptionTask::
30
ExceptionTask ( const ExceptionTask::ErrorCodeEnum& errcode,
31
			const std::string & msg,const char* format, ... )
32
  :ExceptionAbstract(errcode,msg)
33
{
34
  va_list args;
35
  va_start(args,format);
36
37
  const unsigned int SIZE = 256;
38
  char  buffer[SIZE];
39
  vsnprintf(buffer,SIZE,format,args);
40
41
  message = buffer;
42
43
  va_end(args);
44

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