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

#include <nrt/Core/Model/ParameterExceptions.H>

Exception that people should catch when they try to set a Parameter value.

Setting a value may fail for three basic reasons: (1) the value is syntactically malformed (e.g., when trying to set it from a string that contains garbage), (2) a Parameter callback has examined the value and did not like it for whichever reason. Instead of requiring one to catch any of these errors when attempting to set a Parameter value, we expose them all through ParameterException. If a value is syntactically malformed or a parameter callback throws BadParameter, this will be automatically be wrapped into a ParameterException.

tests/test-Component.C, tests/test-PointCloud2OpenNI.C, and tests/test-stream.C.

Definition at line 76 of file ParameterExceptions.H.

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

Public Types

enum  ErrorType {
  MalformedValue, ValueRejectedByCallback, BadValueType, InvalidValue,
  InvalidDefaultValue, MalformedName, NameNotFound, NotInitialized,
  NoOnlineChanges, MultipleMatches
 Type of error.

Public Member Functions

 ParameterException (ErrorType errt, ParameterBase const *param, std::string const &explanation) throw ()
virtual ~ParameterException () throw ()
template<class Archive >
void serialize (Archive &ar)
- 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

ErrorType error_type

Additional Inherited Members

- Protected Member Functions inherited from nrt::exception::SerializableException
template<class Archive >
void serialize (Archive &ar)
- Protected Attributes inherited from nrt::exception::SerializableException
std::string whatstring
 The string representing the exception message.

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