Visual Servoing Platform  version 3.5.1 under development (2023-09-22)
vpIoException Class Reference

#include <visp3/core/vpIoException.h>

+ Inheritance diagram for vpIoException:

Public Types

enum  error { invalidDirectoryName , cantCreateDirectory , cantGetUserName , cantGetenv }
 
enum  generalExceptionEnum {
  memoryAllocationError , memoryFreeError , functionNotImplementedError , ioError ,
  cannotUseConstructorError , notImplementedError , divideByZeroError , dimensionError ,
  fatalError , badValue , notInitialized
}
 

Public Member Functions

 vpIoException (int id, const char *format,...)
 
 vpIoException (int id, const std::string &msg)
 
 vpIoException (int id)
 
Inherited functionalities from vpException
int getCode () const
 
const std::string & getStringMessage () const
 
const char * getMessage () const
 
const char * what () const throw ()
 

Protected Member Functions

void setMessage (const char *format, va_list args)
 

Protected Attributes

int code
 
std::string message
 

Detailed Description

Error that can be emitted by the vpIoTools class and its derivatives.

Definition at line 53 of file vpIoException.h.

Member Enumeration Documentation

◆ error

Lists the possible error than can be emitted while calling vpIo member.

Enumerator
invalidDirectoryName 

Directory name is invalid.

cantCreateDirectory 

Unable to create a directory.

cantGetUserName 

User name is not available.

cantGetenv 

Cannot get environment variable value.

Definition at line 60 of file vpIoException.h.

◆ generalExceptionEnum

Enumerator
memoryAllocationError 

Memory allocation error.

memoryFreeError 

Memory free error.

functionNotImplementedError 

Function not implemented.

ioError 

I/O error.

cannotUseConstructorError 

Contructor error.

notImplementedError 

Not implemented.

divideByZeroError 

Division by zero.

dimensionError 

Bad dimension.

fatalError 

Fatal error.

badValue 

Used to indicate that a value is not in the allowed range.

notInitialized 

Used to indicate that a parameter is not initialized.

Definition at line 74 of file vpException.h.

Constructor & Destructor Documentation

◆ vpIoException() [1/3]

vpIoException::vpIoException ( int  id,
const char *  format,
  ... 
)
inline

Constructor.

Definition at line 72 of file vpIoException.h.

References vpException::setMessage().

◆ vpIoException() [2/3]

vpIoException::vpIoException ( int  id,
const std::string &  msg 
)
inline

Constructor.

Definition at line 84 of file vpIoException.h.

◆ vpIoException() [3/3]

vpIoException::vpIoException ( int  id)
inlineexplicit

Constructor.

Definition at line 89 of file vpIoException.h.

Member Function Documentation

◆ getCode()

int vpException::getCode ( ) const
inherited

Send the object code.

Examples
parallelPort.cpp, and ringLight.cpp.

Definition at line 68 of file vpException.cpp.

References vpException::code.

◆ getMessage()

const char * vpException::getMessage ( ) const
inherited

Send a pointer on the array of char related to the error string. Cannot be NULL.

Examples
fernClassifier.cpp, mbot-apriltag-2D-half-vs.cpp, mbot-apriltag-ibvs.cpp, mbot-apriltag-pbvs.cpp, moveBiclops.cpp, parallelPort.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoFlirPtuIBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_des.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, testConversion.cpp, testDisplays.cpp, testReadImage.cpp, testRobotFlirPtu.cpp, testRobotViper650-frames.cpp, testRobotViper850-frames.cpp, testTrackDot.cpp, trackMeNurbs.cpp, tutorial-apriltag-detector-live-T265-realsense.cpp, tutorial-apriltag-detector-live-rgbd-realsense.cpp, tutorial-apriltag-detector-live-rgbd-structure-core.cpp, tutorial-apriltag-detector-live.cpp, tutorial-apriltag-detector.cpp, tutorial-barcode-detector.cpp, tutorial-chessboard-pose.cpp, tutorial-draw-circle.cpp, tutorial-draw-cross.cpp, tutorial-draw-frame.cpp, tutorial-draw-line.cpp, tutorial-draw-point.cpp, tutorial-draw-rectangle.cpp, tutorial-draw-text.cpp, tutorial-face-detector-live.cpp, tutorial-face-detector.cpp, tutorial-flir-ptu-ibvs.cpp, tutorial-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-reader.cpp, tutorial-mb-generic-tracker-apriltag-rs2.cpp, tutorial-mb-generic-tracker-apriltag-webcam.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-points-realsense-T265.cpp, tutorial-pose-from-qrcode-image.cpp, and tutorial-video-reader.cpp.

Definition at line 64 of file vpException.cpp.

References vpException::message.

Referenced by vpTemplateTracker::trackPyr().

◆ getStringMessage()

◆ setMessage()

◆ what()

const char * vpException::what ( ) const
throw (
)
inherited

Overloading of the what() method of std::exception to return the vpException message.

Returns
pointer on the array of char related to the error string.
Examples
UniversalRobotsMoveToPosition.cpp, UniversalRobotsSavePosition.cpp, frankaGripper.cpp, frankaMoveToPosition.cpp, frankaSavePosition.cpp, getRealSense2Info.cpp, grabRealSense.cpp, grabRealSense2.cpp, grabRealSense2_T265.cpp, grabV4l2MultiCpp11Thread.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6MegaposePBVS.cpp, servoFlirPtuIBVS.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoUniversalRobotsIBVS.cpp, servoUniversalRobotsPBVS.cpp, testAutoThreshold.cpp, testConnectedComponents.cpp, testContours.cpp, testFloodFill.cpp, testFrankaCartForceTorque-2.cpp, testFrankaCartForceTorque.cpp, testFrankaCartVelocity-2.cpp, testFrankaCartVelocity-3.cpp, testFrankaCartVelocity.cpp, testFrankaGetPose.cpp, testFrankaJointPosition.cpp, testFrankaJointTorque.cpp, testFrankaJointVelocity-2.cpp, testFrankaJointVelocity-3.cpp, testFrankaJointVelocity.cpp, testFrankaJointVelocityLimits.cpp, testHistogram.cpp, testImageFilter.cpp, testImgproc.cpp, testIoTools.cpp, testKeyPoint-2.cpp, testKeyPoint-3.cpp, testKeyPoint-4.cpp, testKeyPoint-5.cpp, testKeyPoint-6.cpp, testKeyPoint-7.cpp, testKeyPoint.cpp, testMatrixConvolution.cpp, testMatrixInitialization.cpp, testOccipitalStructure_Core_images.cpp, testOccipitalStructure_Core_imu.cpp, testOccipitalStructure_Core_pcl.cpp, testPerformanceLUT.cpp, testPylonGrabber.cpp, testRealSense2_T265_images.cpp, testRealSense2_T265_images_odometry.cpp, testRealSense2_T265_images_odometry_async.cpp, testRealSense2_T265_imu.cpp, testRealSense2_T265_odometry.cpp, testRealSense2_T265_undistort.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, testUDPClient.cpp, testUDPServer.cpp, testUniversalRobotsCartPosition.cpp, testUniversalRobotsCartVelocity.cpp, testUniversalRobotsGetData.cpp, testUniversalRobotsJointPosition.cpp, testUniversalRobotsJointVelocity.cpp, tutorial-dnn-object-detection-live.cpp, tutorial-franka-acquire-calib-data.cpp, tutorial-mb-generic-tracker-rgbd-realsense-json-settings.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-rgbd-structure-core.cpp, tutorial-mb-generic-tracker-stereo-mono.cpp, tutorial-mb-generic-tracker-stereo.cpp, and tutorial-universal-robots-acquire-calib-data.cpp.

Definition at line 70 of file vpException.cpp.

References vpException::message.

Referenced by vpKeyPoint::computePose(), vpMbDepthDenseTracker::loadConfigFile(), and vpMbDepthNormalTracker::loadConfigFile().

Member Data Documentation

◆ code

int vpException::code
protectedinherited

Contains the error code, see the errorCodeEnum table for details.

Definition at line 62 of file vpException.h.

Referenced by vpException::getCode(), and vpSimulatorException::vpSimulatorException().

◆ message

std::string vpException::message
protectedinherited

Contains an error message (can be empty)

Definition at line 65 of file vpException.h.

Referenced by vpException::getMessage(), vpException::getStringMessage(), vpException::setMessage(), and vpException::what().