Rigid Body Dynamics Library
RBDLError Class Reference

Base class for all RBDL exceptions. More...

#include <rbdl_errors.h>

+ Inheritance diagram for RBDLError:

Public Member Functions

 RBDLError (std::string text)
 
virtual const char * what () const noexcept
 

Protected Attributes

std::string text
 

Detailed Description

Base class for all RBDL exceptions.

The base class for all errors thrown in RBDL. It saves an error message that then can be read when catching the error in the calling code, by calling the what() function.

When catching for this class you will also be catching any other error types derived from this class.

To add another error type just subclass this class, you only need to implement the constructor and call the parent constructor with your error message.

Definition at line 34 of file rbdl_errors.h.

Constructor & Destructor Documentation

◆ RBDLError()

RBDLError ( std::string  text)

Definition at line 15 of file rbdl_errors.cc.

Member Function Documentation

◆ what()

const char * what ( ) const
virtualnoexcept

Definition at line 17 of file rbdl_errors.cc.

References RBDLError::text.

Field Documentation

◆ text

std::string text
protected

Definition at line 37 of file rbdl_errors.h.


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