![]() |
Visual Servoing Platform version 3.7.0
|
#include <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 VP_NOEXCEPT VP_OVERRIDE |
| 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 ) |
Constructor.
Definition at line 55 of file vpException.cpp.
References code, message, and setMessage().
Referenced by operator<<, vpCalibrationException::vpCalibrationException(), vpCalibrationException::vpCalibrationException(), vpDisplayException::vpDisplayException(), vpDisplayException::vpDisplayException(), vpFeatureException::vpFeatureException(), vpFeatureException::vpFeatureException(), vpFrameGrabberException::vpFrameGrabberException(), vpFrameGrabberException::vpFrameGrabberException(), vpImageException::vpImageException(), vpImageException::vpImageException(), vpIoException::vpIoException(), vpIoException::vpIoException(), vpMatrixException::vpMatrixException(), vpMatrixException::vpMatrixException(), vpParallelPortException::vpParallelPortException(), vpParallelPortException::vpParallelPortException(), vpPoseException::vpPoseException(), vpPoseException::vpPoseException(), vpRobotException::vpRobotException(), vpRobotException::vpRobotException(), vpServoException::vpServoException(), vpServoException::vpServoException(), vpSimulatorException::vpSimulatorException(), vpSimulatorException::vpSimulatorException(), vpTrackingException::vpTrackingException(), and vpTrackingException::vpTrackingException().
| vpException::vpException | ( | int | code, |
| const char * | format, | ||
| ... ) |
Constructor.
Definition at line 47 of file vpException.cpp.
References code, message, and setMessage().
| vpException::vpException | ( | int | code, |
| const std::string & | msg ) |
| 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 150 of file vpException.h.
References code, message, and notInitialized.
| 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.
| 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.
|
protected |
Set the message container.
Definition at line 57 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 |
Overloading of the what() method of std::exception to return the vpException message.
Definition at line 72 of file vpException.cpp.
References message.
|
friend |
Print the error structure.
Definition at line 77 of file vpException.cpp.
References operator<<, and vpException().
Referenced by operator<<.
|
protected |
Contains the error code, see the errorCodeEnum table for details.
Definition at line 141 of file vpException.h.
Referenced by getCode(), vpCalibrationException::vpCalibrationException(), vpDisplayException::vpDisplayException(), vpException(), vpException(), vpException(), 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().
|
protected |
Contains an error message (can be empty).
Definition at line 144 of file vpException.h.
Referenced by getMessage(), getStringMessage(), setMessage(), vpException(), vpException(), vpException(), vpException(), vpException(), and what().