Visual Servoing Platform
version 3.6.1 under development (2024-12-10)
|
#include <visp3/core/vpException.h>
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) | |
VP_EXPLICIT | vpException (int code) |
Inherited functionalities from vpException | |
int | code |
std::string | message |
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) |
void | setMessage (const char *format, va_list args) |
vpException () | |
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 59 of file vpException.h.
Definition at line 62 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 45 of file vpException.cpp.
BEGIN_VISP_NAMESPACE vpException::vpException | ( | int | code | ) |
Basic destructor. Do nothing but implemented to fit the inheritance from std::exception
Constructor.
Definition at line 43 of file vpException.cpp.
|
inlineprotected |
forbid the empty constructor (protected)
Definition at line 146 of file vpException.h.
int vpException::getCode | ( | ) | const |
Send the object code.
Definition at line 69 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 nullptr.
Definition at line 65 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 67 of file vpException.cpp.
References message.
Referenced by vpMomentCommon::updateAll().
|
protected |
Set the message container.
Definition at line 57 of file vpException.cpp.
References message.
Referenced by vpCalibrationException::vpCalibrationException(), vpDisplayException::vpDisplayException(), vpException(), vpFeatureException::vpFeatureException(), vpFrameGrabberException::vpFrameGrabberException(), vpImageException::vpImageException(), vpIoException::vpIoException(), vpMatrixException::vpMatrixException(), vpParallelPortException::vpParallelPortException(), vpPoseException::vpPoseException(), vpRobotException::vpRobotException(), vpServoException::vpServoException(), 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 71 of file vpException.cpp.
References message.
Referenced by vpKeyPoint::computePose(), vpMbDepthDenseTracker::loadConfigFile(), and vpMbDepthNormalTracker::loadConfigFile().
|
friend |
Print the error structure.
Definition at line 73 of file vpException.cpp.
|
protected |
Contains the error code, see the errorCodeEnum table for details.
Definition at line 137 of file vpException.h.
Referenced by getCode().
|
protected |
Contains an error message (can be empty)
Definition at line 140 of file vpException.h.
Referenced by getMessage(), getStringMessage(), setMessage(), and what().