iLab Neuromorphic Robotics Toolkit  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nrt::exception::ModuleException Class Reference

#include <nrt/Core/Blackboard/Exceptions.H>

Class for Module exceptions.

    Typically, you should throw an exception in a Module like so:
throw NRT_MODULE_EXCEPTION("Oh no, something went wrong");
tests/test-Module.C, and tests/test-ResultsSyntax.C.

Definition at line 220 of file Exceptions.H.

Inheritance diagram for nrt::exception::ModuleException:
nrt::exception::SerializableException nrt::exception::Exception


class  ModuleExceptionData
 Data stored about an exception, we have a vector of those to simulate a stack unwinding. More...

Public Member Functions

 ModuleException () throw ()
 Construct from nothing, needed by serialization but contains no valid data.
 ModuleException (nrt::ModuleBase const *mod, std::string const &wherestr, std::string const &whatstr) throw ()
 Construct for the first time, from within a module.
 ModuleException (ModuleException const &e) throw ()
 Copy constructor.
virtual ~ModuleException () throw ()
ModuleExceptionoperator= (ModuleException const &e) throw ()
< ModuleExceptionData > const & 
fulldata () const
 Get stack trace.
std::string const str () const
 Dump some informational description to string, full stack trace.
- Public Member Functions inherited from nrt::exception::SerializableException
 SerializableException () throw ()
 Default constructor.
 SerializableException (char const *msg) throw ()
 Construct from a C string message.
 SerializableException (SerializableException const &e) throw ()
 Copy constructor.
virtual ~SerializableException () throw ()
SerializableExceptionoperator= (SerializableException const &e) throw ()
- Public Member Functions inherited from nrt::exception::Exception
 Exception () throw ()
 Constructor with a default non-specific error message.
 Exception (char const *msg) throw ()
 Constructor with a given error message. More...
 Exception (Exception const &e) throw ()
 Copy constructor.
virtual ~Exception () throw ()
 Virtual destructor for safe inheritance.
Exceptionoperator= (Exception const &e) throw ()
char const * what () const throw ()
 Return a C string describing the error. More...

Public Attributes

std::map< std::string,
std::string > 
 Public data available for users to stuff whatever they like into.

Protected Member Functions

void adddata (ModuleExceptionData const &d)
 Add more data, catchAndRethrow() does it.
template<class Archive >
void serialize (Archive &ar)
 Serialize object into/out of an archive.
- Protected Member Functions inherited from nrt::exception::SerializableException
template<class Archive >
void serialize (Archive &ar)

Protected Attributes

std::vector< ModuleExceptionDatadata
 Our accumulated data.
- Protected Attributes inherited from nrt::exception::SerializableException
std::string whatstring
 The string representing the exception message.
- Protected Attributes inherited from nrt::exception::Exception
char const * whatptr
 Pointer to a message, returned by what()


class cereal::access
void nrt::blackboard::catchAndRethrow (std::string const &bbwhere, nrt::ModuleBase *mod)

The documentation for this class was generated from the following file: