Visual Servoing Platform  version 3.2.0 under development (2019-01-22)
vpRobotException Class Reference

#include <visp3/robot/vpRobotException.h>

+ Inheritance diagram for vpRobotException:

Public Types

enum  errorRobotCodeEnum {
  constructionError, uniqueRobotError, wrongStateError, stateModificationError,
  communicationError, lowLevelError, readingParametersError, notInitializedError,
  notImplementedError, positionOutOfRangeError
}
 
enum  generalExceptionEnum {
  memoryAllocationError, memoryFreeError, functionNotImplementedError, ioError,
  cannotUseConstructorError, notImplementedError, divideByZeroError, dimensionError,
  fatalError, badValue, notInitialized
}
 

Public Member Functions

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

Protected Member Functions

void setMessage (const char *format, va_list args)
 

Protected Attributes

int code
 
std::string message
 

Detailed Description

Error that can be emited by the vpRobot class and its derivates.

Definition at line 71 of file vpRobotException.h.

Member Enumeration Documentation

Lists the possible error than can be emmited while calling vpRobot member.

Enumerator
constructionError 

Erreur lancee par le constructor.

uniqueRobotError 

Erreur lancee lors de la construction d'un objet CRobot correspondant a un robot reel si l'objet de la classe en question doit etre unique.

wrongStateError 

Erreur lancee par les fonctions de commande si le robot n'est pas dans le bon etat au moment du passage d'ordre.

stateModificationError 

Erreur lancee par les fonctions de changement d'etat si le changement demandee n'est pas possible.

communicationError 

Erreur generee lors d'un retour non nulle d'une fonction de communication de la lib Afma6.

lowLevelError 

Erreur lancee apres un appel a une fonction de la lib bas-niveau de control de l'afma6 ayant renvoye une erreur.

readingParametersError 

Erreur lancee par la fonction de parsing des parametres du robot, si le fichier donne en entree n'est pas valide.

notInitializedError 

Erreur lancee par les methodes d'une classe qui necessite un appel a une fonction d'initialisation apres la construction si l'init n'a pas ete fait.

notImplementedError 

Erreur lancee par les fonctions decrites dans lAPI mais pas completement implementee. Dans ce cas, la fonction affiche simplement un message d'erreur avant de sortir par le 'throw'.

positionOutOfRangeError 

Position is out of range.

Definition at line 78 of file vpRobotException.h.

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 87 of file vpException.h.

Constructor & Destructor Documentation

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

Definition at line 127 of file vpRobotException.h.

References vpException::setMessage().

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

Definition at line 135 of file vpRobotException.h.

vpRobotException::vpRobotException ( const int  id)
inlineexplicit

Definition at line 136 of file vpRobotException.h.

Member Function Documentation

int vpException::getCode ( void  )
inherited

Send the object code.

Examples:
parallelPort.cpp, and ringLight.cpp.

Definition at line 94 of file vpException.cpp.

References vpException::code.

const char * vpException::getMessage ( void  ) 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, servoViper650FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent-SR300.cpp, servoViper650FourPoints2DCamVelocityInteractionCurrent.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityInteractionCurrent.cpp, servoViper850FourPoints2DArtVelocityInteractionDesired.cpp, servoViper850FourPoints2DCamVelocityInteractionCurrent.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, testRobotViper650-frames.cpp, testRobotViper850-frames.cpp, testTrackDot.cpp, trackMeNurbs.cpp, tutorial-apriltag-detector-live.cpp, tutorial-apriltag-detector.cpp, tutorial-barcode-detector.cpp, tutorial-draw-cross.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-image-display-scaled-auto.cpp, tutorial-image-display-scaled-manu.cpp, tutorial-image-display.cpp, tutorial-image-reader.cpp, tutorial-mb-generic-tracker-apriltag-live-realsense2.cpp, tutorial-mb-generic-tracker-apriltag-live-webcam.cpp, tutorial-mb-tracker-stereo.cpp, tutorial-pose-from-points-image.cpp, tutorial-pose-from-points-live.cpp, tutorial-pose-from-qrcode-image.cpp, and tutorial-video-reader.cpp.

Definition at line 90 of file vpException.cpp.

References vpException::message.

Referenced by vpTemplateTracker::trackPyr().

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:
frankaGripper.cpp, frankaMoveToPosition.cpp, frankaSavePosition.cpp, getRealSense2Info.cpp, grabRealSense.cpp, grabRealSense2.cpp, grabV4l2MultiCpp11Thread.cpp, servoFrankaPBVS.cpp, testAprilTag.cpp, testAutoThreshold.cpp, testConnectedComponents.cpp, testContours.cpp, testFloodFill.cpp, testFrankaCartVelocity-2.cpp, testFrankaCartVelocity-3.cpp, testFrankaCartVelocity.cpp, testFrankaGetPose.cpp, testFrankaJointPosition.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, testPerformanceLUT.cpp, testPylonGrabber.cpp, testRealSense_R200.cpp, testRealSense_SR300.cpp, testUDPClient.cpp, testUDPServer.cpp, tutorial-dnn-object-detection-live.cpp, tutorial-franka-acquire-calib-data.cpp, tutorial-mb-generic-tracker-rgbd-realsense.cpp, tutorial-mb-generic-tracker-stereo-mono.cpp, and tutorial-mb-generic-tracker-stereo.cpp.

Definition at line 102 of file vpException.cpp.

References vpException::message.

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

Member Data Documentation

int vpException::code
protectedinherited

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

Definition at line 75 of file vpException.h.

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

std::string vpException::message
protectedinherited

Contains an error message (can be empty)

Definition at line 78 of file vpException.h.

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