![]() |
Visual Servoing Platform version 3.6.0
|
#include <vpException.h>
Inheritance diagram for vpException:Public Types | |
| enum | generalExceptionEnum { memoryAllocationError , memoryFreeError , functionNotImplementedError , ioError , cannotUseConstructorError , notImplementedError , divideByZeroError , dimensionError , fatalError , badValue , notInitialized } |
Public Member Functions | |
| vpException (int code, const char *format, va_list args) | |
| vpException (int code, const char *format,...) | |
| vpException (int code, const std::string &msg) | |
| vpException (int code) | |
| virtual | ~vpException () |
Protected Member Functions | |
| void | setMessage (const char *format, va_list args) |
| vpException () | |
Protected Attributes | |
| int | code |
| std::string | message |
Inherited functionalities from vpException | |
| int | getCode () const |
| const std::string & | getStringMessage () const |
| const char * | getMessage () const |
| const char * | what () const throw () |
| VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpException &art) |
error that can be emitted by ViSP classes.
This class inherits from the standard std::exception contained in the C++ STL. It is therefore possible to catch vpException with any other derivative of std::exception in the same catch.
Definition at line 58 of file vpException.h.
Definition at line 74 of file vpException.h.
|
inlineprotected |
forbid the empty constructor (protected)
Definition at line 71 of file vpException.h.
| vpException::vpException | ( | int | code, |
| const char * | format, | ||
| va_list | args | ||
| ) |
| vpException::vpException | ( | int | code, |
| const char * | format, | ||
| ... | |||
| ) |
| vpException::vpException | ( | int | code, |
| const std::string & | msg | ||
| ) |
Constructor.
Definition at line 44 of file vpException.cpp.
|
explicit |
Constructor.
Definition at line 42 of file vpException.cpp.
|
inlinevirtual |
Destructor. Do nothing but implemented to fit the inheritance from std::exception
Definition at line 113 of file vpException.h.
| int vpException::getCode | ( | ) | const |
Send the object code.
Definition at line 68 of file vpException.cpp.
References code.
| const char * vpException::getMessage | ( | ) | const |
Send a pointer on the array of char related to the error string. Cannot be NULL.
Definition at line 64 of file vpException.cpp.
References message.
Referenced by vpTemplateTracker::trackPyr().
| const std::string & vpException::getStringMessage | ( | ) | const |
Send a reference (constant) related the error message (can be empty).
Definition at line 66 of file vpException.cpp.
References message.
|
protected |
Set the message container.
Definition at line 56 of file vpException.cpp.
References message.
Referenced by vpCalibrationException::vpCalibrationException(), vpDisplayException::vpDisplayException(), vpException(), vpException(), vpFeatureException::vpFeatureException(), vpFrameGrabberException::vpFrameGrabberException(), vpImageException::vpImageException(), vpIoException::vpIoException(), vpMatrixException::vpMatrixException(), vpParallelPortException::vpParallelPortException(), vpPoseException::vpPoseException(), vpRobotException::vpRobotException(), vpServoException::vpServoException(), vpSimulatorException::vpSimulatorException(), and vpTrackingException::vpTrackingException().
| const char * vpException::what | ( | ) | const | |
| throw | ( | |||
| ) | ||||
Overloading of the what() method of std::exception to return the vpException message.
Definition at line 70 of file vpException.cpp.
References message.
Referenced by vpKeyPoint::computePose(), vpMbDepthDenseTracker::loadConfigFile(), and vpMbDepthNormalTracker::loadConfigFile().
|
friend |
Print the error structure.
Definition at line 72 of file vpException.cpp.
|
protected |
Contains the error code, see the errorCodeEnum table for details.
Definition at line 62 of file vpException.h.
Referenced by getCode(), and vpSimulatorException::vpSimulatorException().
|
protected |
Contains an error message (can be empty)
Definition at line 65 of file vpException.h.
Referenced by getMessage(), getStringMessage(), setMessage(), and what().