Visual Servoing Platform
version 3.4.0
|
#include <vpException.h>
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 () |
const char * | what () const throw () |
Inherited functionalities from vpException | |
int | getCode () const |
const std::string & | getStringMessage () const |
const char * | getMessage () const |
Protected Member Functions | |
void | setMessage (const char *format, va_list args) |
vpException () | |
Protected Attributes | |
int | code |
std::string | message |
Friends | |
VISP_EXPORT std::ostream & | operator<< (std::ostream &os, const vpException &art) |
error that can be emited by ViSP classes.
This class inherites 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 71 of file vpException.h.
Definition at line 87 of file vpException.h.
|
inlineprotected |
forbid the empty constructor (protected)
Definition at line 84 of file vpException.h.
vpException::vpException | ( | int | code, |
const char * | format, | ||
va_list | args | ||
) |
Definition at line 64 of file vpException.cpp.
References setMessage().
vpException::vpException | ( | int | code, |
const char * | format, | ||
... | |||
) |
Definition at line 56 of file vpException.cpp.
References setMessage().
vpException::vpException | ( | int | code, |
const std::string & | msg | ||
) |
Definition at line 54 of file vpException.cpp.
|
explicit |
Definition at line 52 of file vpException.cpp.
|
inlinevirtual |
Basic destructor. Do nothing but implemented to fit the inheritance from std::exception
Definition at line 111 of file vpException.h.
int vpException::getCode | ( | ) | const |
Send the object code.
Definition at line 94 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 90 of file vpException.cpp.
References message.
Referenced by vpCalibration::addPoint(), and vpTemplateTracker::trackPyr().
const std::string & vpException::getStringMessage | ( | ) | const |
Send a reference (constant) related the error message (can be empty).
Definition at line 92 of file vpException.cpp.
References message.
|
protected |
Set the message container.
Definition at line 78 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(), 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 102 of file vpException.cpp.
References message.
Referenced by vpKeyPoint::computePose(), vpMbDepthDenseTracker::loadConfigFile(), vpMbDepthNormalTracker::loadConfigFile(), and vpMbGenericTracker::track().
|
friend |
Print the error structure.
Definition at line 118 of file vpException.cpp.
|
protected |
Contains the error code, see the errorCodeEnum table for details.
Definition at line 75 of file vpException.h.
Referenced by getCode(), and vpSimulatorException::vpSimulatorException().
|
protected |
Contains an error message (can be empty)
Definition at line 78 of file vpException.h.
Referenced by getMessage(), getStringMessage(), setMessage(), and what().