dynamic-graph  4.1.0-8-gdab7-dirty
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 #include <dynamic-graph/fwd.hh>
12 
13 namespace dynamicgraph {
18 class DYNAMIC_GRAPH_DLLAPI ExceptionSignal : public ExceptionAbstract {
19 public:
20  enum ErrorCodeEnum {
21  GENERIC = ExceptionAbstract::SIGNAL,
22  READWRITE_LOCK,
23  COPY_NOT_INITIALIZED,
24  NOT_INITIALIZED,
25  PLUG_IMPOSSIBLE,
26  SET_IMPOSSIBLE,
27  BAD_CAST
28  };
29 
30  static const std::string EXCEPTION_NAME;
31 
32  explicit ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
33  const std::string &msg = "");
34  ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
35  const std::string &msg, const char *format, ...);
36  virtual ~ExceptionSignal() throw() {}
37 
38  virtual const std::string &getExceptionName() const { return EXCEPTION_NAME; }
39 };
40 
41 } // end of namespace dynamicgraph
42 
43 #endif
Exceptions raised when an error related to signals happen.
Abstract root class for all dynamic-graph exceptions.