Skip to content
Snippets Groups Projects
exception-signal.hh 1.58 KiB
Newer Older
Thomas Moulard's avatar
Thomas Moulard committed
/*
 * Copyright 2010,
 * François Bleibel,
 * Olivier Stasse,
Thomas Moulard's avatar
Thomas Moulard committed
 * CNRS/AIST
Thomas Moulard's avatar
Thomas Moulard committed
 */

#ifndef __SOT_SIGNAL_EXCEPTION_H
#define __SOT_SIGNAL_EXCEPTION_H

/* --------------------------------------------------------------------- */
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */

Guilhem Saurel's avatar
Guilhem Saurel committed
#include <sot/core/exception-abstract.hh>
Guilhem Saurel's avatar
Guilhem Saurel committed

#include "sot/core/api.hh"
/* --------------------------------------------------------------------- */
/* --- CLASS ----------------------------------------------------------- */
/* --------------------------------------------------------------------- */

Guilhem Saurel's avatar
Guilhem Saurel committed
namespace dynamicgraph {
namespace sot {
/* \class ExceptionSignal
Guilhem Saurel's avatar
Guilhem Saurel committed
class SOT_CORE_EXPORT ExceptionSignal : public ExceptionAbstract
Guilhem Saurel's avatar
Guilhem Saurel committed
 public:
Guilhem Saurel's avatar
Guilhem Saurel committed
  enum ErrorCodeEnum {
    GENERIC = ExceptionAbstract::SIGNAL

    ,
    READWRITE_LOCK,
    COPY_NOT_INITIALIZED,
    NOT_INITIALIZED,
    PLUG_IMPOSSIBLE,
    SET_IMPOSSIBLE,
    BAD_CAST
  };

  static const std::string EXCEPTION_NAME;
Guilhem Saurel's avatar
Guilhem Saurel committed
  virtual const std::string &getExceptionName(void) const {
    return EXCEPTION_NAME;
  }
Guilhem Saurel's avatar
Guilhem Saurel committed
 public:
Guilhem Saurel's avatar
Guilhem Saurel committed
  ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
                  const std::string &msg = "");
  ExceptionSignal(const ExceptionSignal::ErrorCodeEnum &errcode,
                  const std::string &msg, const char *format, ...);
  virtual ~ExceptionSignal(void) throw() {}
Guilhem Saurel's avatar
Guilhem Saurel committed
} /* namespace sot */
} /* namespace dynamicgraph */

#endif /* #ifndef __SOT_SIGNAL_EXCEPTION_H */

/*
 * Local variables:
 * c-basic-offset: 2
 * End:
 */