GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: include/dynamic-graph/exception-signal.h Lines: 1 2 50.0 %
Date: 2023-03-15 12:04:10 Branches: 0 0 - %

Line Branch Exec Source
1
// -*- mode: c++ -*-
2
// Copyright 2010, François Bleibel, Thomas Moulard, Olivier Stasse,
3
// JRL, CNRS/AIST.
4
//
5
6
#ifndef DYNAMIC_GRAPH_EXCEPTION_SIGNAL_H
7
#define DYNAMIC_GRAPH_EXCEPTION_SIGNAL_H
8
9
#include <dynamic-graph/dynamic-graph-api.h>
10
#include <dynamic-graph/exception-abstract.h>
11
12
#include <dynamic-graph/fwd.hh>
13
14
namespace dynamicgraph {
15
/// \ingroup error
16
///
17
/// \brief Exceptions raised when an error related to signals
18
/// happen.
19
class DYNAMIC_GRAPH_DLLAPI ExceptionSignal : public ExceptionAbstract {
20
 public:
21
  enum ErrorCodeEnum {
22
    GENERIC = ExceptionAbstract::SIGNAL,
23
    READWRITE_LOCK,
24
    COPY_NOT_INITIALIZED,
25
    NOT_INITIALIZED,
26
    PLUG_IMPOSSIBLE,
27
    SET_IMPOSSIBLE,
28
    BAD_CAST
29
  };
30
31
  static const std::string EXCEPTION_NAME;
32
33
  explicit ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
34
                           const std::string &msg = "");
35
  ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
36
                  const std::string &msg, const char *format, ...);
37
68
  virtual ~ExceptionSignal() throw() {}
38
39
  virtual const std::string &getExceptionName() const { return EXCEPTION_NAME; }
40
};
41
42
}  // end of namespace dynamicgraph
43
44
#endif  //! DYNAMIC_GRAPH_EXCEPTION_SIGNAL_H