dynamic-graph  4.4.3
Dynamic graph library
exception-signal.h
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 {
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  virtual ~ExceptionSignal() throw() {}
38 
39  virtual const std::string &getExceptionName() const { return EXCEPTION_NAME; }
40 };
41 
42 } // end of namespace dynamicgraph
43 
44 #endif
dynamicgraph
Definition: command-bind.h:30
dynamicgraph::ExceptionAbstract
Abstract root class for all dynamic-graph exceptions.
Definition: exception-abstract.h:31
dynamicgraph::ExceptionSignal
Exceptions raised when an error related to signals happen.
Definition: exception-signal.h:19