diff --git a/modules/ar/include/visp3/ar/vpSimulatorException.h b/modules/ar/include/visp3/ar/vpSimulatorException.h index d09a88ad56..e5a75bffe8 100644 --- a/modules/ar/include/visp3/ar/vpSimulatorException.h +++ b/modules/ar/include/visp3/ar/vpSimulatorException.h @@ -1,5 +1,4 @@ -/**************************************************************************** - * +/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2023 by Inria. All rights reserved. * @@ -30,16 +29,15 @@ * * Description: * Exceptions that can be emitted by the simulator classes. - * -*****************************************************************************/ + */ #ifndef _vpSimulatorException_h_ #define _vpSimulatorException_h_ -/* \file vpSimulatorException.h - \brief Error that can be emitted by the vpSimulator class and its derivatives +/*! + * \file vpSimulatorException.h + * \brief Error that can be emitted by the vpSimulator class and its derivatives */ -/* Classes standards. */ #include @@ -48,18 +46,18 @@ #include /* Classe string. */ /*! - - \class vpSimulatorException - \brief Error that can be emitted by the vpSimulator class and its derivatives. + * \class vpSimulatorException + * \brief Error that can be emitted by the vpSimulator class and its derivatives. */ class VISP_EXPORT vpSimulatorException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpSimulator member - */ - enum errorSimulatorCodeEnum { + * Lists the possible error than can be emitted while calling + * vpSimulator member + */ + enum errorSimulatorCodeEnum + { ioError, //!< I/O error noFileNameError, //!< Filename error notInitializedError, //!< Initialization error @@ -68,8 +66,19 @@ class VISP_EXPORT vpSimulatorException : public vpException }; public: + /*! + * Constructor. + */ vpSimulatorException(int id, const char *format, ...); + + /*! + * Constructor. + */ vpSimulatorException(int id, const std::string &msg); + + /*! + * Constructor. + */ explicit vpSimulatorException(int id); }; diff --git a/modules/core/include/visp3/core/vpDisplayException.h b/modules/core/include/visp3/core/vpDisplayException.h index 7cc4444365..4214b7eaf3 100644 --- a/modules/core/include/visp3/core/vpDisplayException.h +++ b/modules/core/include/visp3/core/vpDisplayException.h @@ -34,52 +34,43 @@ #ifndef _vpDisplayException_h_ #define _vpDisplayException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- +/*! + * \file vpDisplayException.h + * \brief error that can be emitted by the vpDisplay class and its derivatives */ -/* \file vpDisplayException.h - \brief error that can be emitted by the vpDisplay class and its derivatives - */ -/* Classes standards. */ -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include #include #include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - /*! - \class vpDisplayException - \ingroup group_core_debug - \brief Error that can be emitted by the vpDisplay class and its derivatives. + * \class vpDisplayException + * \ingroup group_core_debug + * \brief Error that can be emitted by the vpDisplay class and its derivatives. */ class VISP_EXPORT vpDisplayException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpDisplay member - */ - enum errorDisplayCodeEnum { - notInitializedError, - cannotOpenWindowError, - connexionError, - XWindowsError, - GTKWindowsError, - colorAllocError, - depthNotSupportedError + * Lists the possible error than can be emitted while calling + * vpDisplay member + */ + enum errorDisplayCodeEnum + { + notInitializedError, //!< Display not initialized + cannotOpenWindowError, //!< Unable to open display window + connexionError, //!< Connection error + XWindowsError, //!< XWindow error + GTKWindowsError, //!< GTK error + colorAllocError, //!< Color allocation error + depthNotSupportedError //!< Color depth not supported }; public: + /*! + * Constructor. + */ vpDisplayException(int id, const char *format, ...) { this->code = id; @@ -89,9 +80,15 @@ class VISP_EXPORT vpDisplayException : public vpException va_end(args); } - vpDisplayException(int id, const std::string &msg) : vpException(id, msg) {} + /*! + * Constructor. + */ + vpDisplayException(int id, const std::string &msg) : vpException(id, msg) { } - explicit vpDisplayException(int id) : vpException(id) {} + /*! + * Constructor. + */ + explicit vpDisplayException(int id) : vpException(id) { } }; #endif diff --git a/modules/core/include/visp3/core/vpException.h b/modules/core/include/visp3/core/vpException.h index 1922156404..70b74a51bd 100644 --- a/modules/core/include/visp3/core/vpException.h +++ b/modules/core/include/visp3/core/vpException.h @@ -31,37 +31,29 @@ * Exception handling. */ -/* \file vpException.h - \brief error that can be emitted by the vp class and its derivatives +/*! + * \file vpException.h + * \brief error that can be emitted by the vp class and its derivatives */ #ifndef _vpException_h_ #define _vpException_h_ -/* --------------------------------------------------------------------- */ -/* --- INCLUDE --------------------------------------------------------- */ -/* --------------------------------------------------------------------- */ - #include -/* Classes standards. */ -#include /* Classe std::ostream. */ +#include #include -#include /* Classe string. */ - -/* --------------------------------------------------------------------- */ -/* --- CLASS ----------------------------------------------------------- */ -/* --------------------------------------------------------------------- */ +#include /*! - \class vpException - \ingroup group_core_debug - \brief error that can be emitted 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. + * \class vpException + * \ingroup group_core_debug + * \brief 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. */ class VISP_EXPORT vpException : public std::exception { @@ -76,10 +68,11 @@ class VISP_EXPORT vpException : public std::exception void setMessage(const char *format, va_list args); //! forbid the empty constructor (protected) - vpException() : code(notInitialized), message(""){}; + vpException() : code(notInitialized), message("") { }; public: - enum generalExceptionEnum { + enum generalExceptionEnum + { memoryAllocationError, //!< Memory allocation error memoryFreeError, //!< Memory free error functionNotImplementedError, //!< Function not implemented @@ -93,37 +86,66 @@ class VISP_EXPORT vpException : public std::exception notInitialized //!< Used to indicate that a parameter is not initialized. }; + /*! + * Constructor. + */ vpException(int code, const char *format, va_list args); + /*! + * Constructor. + */ vpException(int code, const char *format, ...); + + /*! + * Constructor. + */ vpException(int code, const std::string &msg); + + /*! + * Constructor. + */ explicit vpException(int code); /*! - Basic destructor. Do nothing but implemented to fit the inheritance from - std::exception - */ + * Destructor. Do nothing but implemented to fit the inheritance from + * std::exception + */ #if VISP_CXX_STANDARD > VISP_CXX_STANDARD_98 - virtual ~vpException() {} + virtual ~vpException() { } #else - virtual ~vpException() throw() {} + virtual ~vpException() throw() { } #endif /** @name Inherited functionalities from vpException */ //@{ - //! Send the object code. + /*! + * Send the object code. + */ int getCode() const; - //! Send a reference (constant) related the error message (can be empty). + /*! + * Send a reference (constant) related the error message (can be empty). + */ const std::string &getStringMessage() const; - //! send a pointer on the array of \e char related to the error string. - //! Cannot be \e NULL. + + /*! + * Send a pointer on the array of \e char related to the error string. + * Cannot be \e NULL. + */ const char *getMessage() const; + + /*! + * Overloading of the what() method of std::exception to return the vpException + * message. + * + * \return pointer on the array of \e char related to the error string. + */ + const char *what() const throw(); //@} - //! Print the error structure. + /*! + * Print the error structure. + */ friend VISP_EXPORT std::ostream &operator<<(std::ostream &os, const vpException &art); - - const char *what() const throw(); }; -#endif /* #ifndef _vpException_h_ */ +#endif diff --git a/modules/core/include/visp3/core/vpFrameGrabberException.h b/modules/core/include/visp3/core/vpFrameGrabberException.h index cc1c26a018..1229b44cb5 100644 --- a/modules/core/include/visp3/core/vpFrameGrabberException.h +++ b/modules/core/include/visp3/core/vpFrameGrabberException.h @@ -35,45 +35,40 @@ #ifndef _vpFrameGrabberException_h_ #define _vpFrameGrabberException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* \file vpFrameGrabberException.h - \brief error that can be emitted by the vpFrameGrabber class and its - derivates +/*! + * \file vpFrameGrabberException.h + * \brief error that can be emitted by the vpFrameGrabber class and its + * derivates */ -/* Classes standards. */ -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include #include #include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ /*! - \brief Error that can be emitted by the vpFrameGrabber class and its - derivates + * \brief Error that can be emitted by the vpFrameGrabber class and its + * derivates. */ class VISP_EXPORT vpFrameGrabberException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpFrameGrabber member - */ - enum errorFrameGrabberCodeEnum { settingError, initializationError, otherError }; + * Lists the possible error than can be emitted while calling + * vpFrameGrabber member + */ + enum errorFrameGrabberCodeEnum + { + settingError, //!< Grabber settings error + initializationError, //!< Grabber initialization error + otherError //!< Grabber returned an other error + }; public: + /*! + * Constructor. + */ vpFrameGrabberException(int id, const char *format, ...) { this->code = id; @@ -82,8 +77,16 @@ class VISP_EXPORT vpFrameGrabberException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpFrameGrabberException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpFrameGrabberException(int id) : vpException(id) { } }; -#endif /* #ifndef _vpFrameGrabberException_h_ */ +#endif diff --git a/modules/core/include/visp3/core/vpImageException.h b/modules/core/include/visp3/core/vpImageException.h index c1806e2e74..9770d62326 100644 --- a/modules/core/include/visp3/core/vpImageException.h +++ b/modules/core/include/visp3/core/vpImageException.h @@ -34,53 +34,43 @@ #ifndef _vpImageException_h_ #define _vpImageException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* \file vpImageException.h - \brief error that can be emitted by the vpImage class and its derivatives +/*! + * \file vpImageException.h + * \brief error that can be emitted by the vpImage class and its derivatives */ -/* Classes standards. */ #include #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ /*! - - \class vpImageException - \ingroup group_core_debug - \brief Error that can be emitted by the vpImage class and its derivatives. + * \class vpImageException + * \ingroup group_core_debug + * \brief Error that can be emitted by the vpImage class and its derivatives. */ class VISP_EXPORT vpImageException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpImage member - */ - enum errorImageCodeEnum { - ioError, - noFileNameError, - notInitializedError, - incorrectInitializationError, - notInTheImage + * \brief Lists the possible error than can be emitted while calling + * vpImage member + */ + enum errorImageCodeEnum + { + ioError, //!< Image io error + noFileNameError, //!< Image file name error + notInitializedError, //!< Image not initialized + incorrectInitializationError, //!< Wrong image initialization + notInTheImage //!< Pixel not in the image }; public: + /*! + * Constructor. + */ vpImageException(int id, const char *format, ...) { this->code = id; @@ -89,7 +79,15 @@ class VISP_EXPORT vpImageException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpImageException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpImageException(int id) : vpException(id) { } }; diff --git a/modules/core/include/visp3/core/vpIoException.h b/modules/core/include/visp3/core/vpIoException.h index 386d4c322e..55cf163360 100644 --- a/modules/core/include/visp3/core/vpIoException.h +++ b/modules/core/include/visp3/core/vpIoException.h @@ -34,16 +34,9 @@ #ifndef _vpIoException_h_ #define _vpIoException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - /*! - \file vpIoException.h - \brief Error that can be emitted by the vpIoTools class and its derivatives. + * \file vpIoException.h + * \brief Error that can be emitted by the vpIoTools class and its derivatives. */ #include @@ -52,33 +45,30 @@ #include #include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - /*! - \class vpIoException - \ingroup group_core_debug - \brief Error that can be emitted by the vpIoTools class and its derivatives. + * \class vpIoException + * \ingroup group_core_debug + * \brief Error that can be emitted by the vpIoTools class and its derivatives. */ class VISP_EXPORT vpIoException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpIo member. - */ - enum error { - invalidDirectoryName, /*! Directory name is invalid. */ - cantCreateDirectory, /*! Unable to create a directory. */ - cantGetUserName, /*! User name is not available. */ - cantGetenv /*! Cannot get environment variable value. */ + * \brief Lists the possible error than can be emitted while calling + * vpIo member. + */ + enum error + { + invalidDirectoryName, //!< Directory name is invalid. + cantCreateDirectory, //!< Unable to create a directory. + cantGetUserName, //!< User name is not available. + cantGetenv //!< Cannot get environment variable value. }; public: + /*! + * Constructor. + */ vpIoException(int id, const char *format, ...) { this->code = id; @@ -87,7 +77,15 @@ class VISP_EXPORT vpIoException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpIoException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpIoException(int id) : vpException(id) { } }; diff --git a/modules/core/include/visp3/core/vpMatrixException.h b/modules/core/include/visp3/core/vpMatrixException.h index 9a53f5243f..c38ee9a49a 100644 --- a/modules/core/include/visp3/core/vpMatrixException.h +++ b/modules/core/include/visp3/core/vpMatrixException.h @@ -34,60 +34,52 @@ #ifndef _vpMatrixException_h_ #define _vpMatrixException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* Classes standards. */ -// - #include #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ - -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ +#include +#include /*! - \class vpMatrixException - \ingroup group_core_debug - \brief error that can be emitted by the vpMatrix class and its derivatives + * \class vpMatrixException + * \ingroup group_core_debug + * \brief error that can be emitted by the vpMatrix class and its derivatives */ class VISP_EXPORT vpMatrixException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpMatrix member - */ - enum errorCodeEnum { - //! error returns by a constructor + * \brief Lists the possible error than can be emitted while calling + * vpMatrix member + */ + enum errorCodeEnum + { +//! Error returns by a constructor constructionError, - //! something is not initialized + //! Something is not initialized notInitializedError, - //! function not implemented + //! Function not implemented notImplementedError, - //! index out of range + //! Index out of range outOfRangeError, - //! iterative algorithm doesn't converge (ex SVD) + //! Iterative algorithm doesn't converge (ex SVD) convergencyError, + //! Incorrect matrix size incorrectMatrixSizeError, + //! Forbidden operation forbiddenOperatorError, + //! Sub operation matrix error subMatrixError, + //! Matrix operation error matrixError, + //! Rank deficient rankDeficient }; public: + /*! + * Constructor. + */ vpMatrixException(int id, const char *format, ...) { this->code = id; @@ -96,9 +88,16 @@ class VISP_EXPORT vpMatrixException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpMatrixException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpMatrixException(int id) : vpException(id) { } - // vpMatrixException() : vpException() { ;} }; #endif diff --git a/modules/core/include/visp3/core/vpTrackingException.h b/modules/core/include/visp3/core/vpTrackingException.h index 863cd1dfad..c17e6bcd9a 100644 --- a/modules/core/include/visp3/core/vpTrackingException.h +++ b/modules/core/include/visp3/core/vpTrackingException.h @@ -34,50 +34,40 @@ #ifndef _vpTrackingException_H #define _vpTrackingException_H -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* \file vpTrackingException.h - \brief error that can be emitted by the vpTracker class and its derivatives +/*! + * \file vpTrackingException.h + * \brief error that can be emitted by the vpTracker class and its derivatives */ -/* Classes standards. */ -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include #include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ /*! - \class vpTrackingException - \ingroup group_core_debug - \brief Error that can be emitted by the vpTracker class and its derivatives. + * \class vpTrackingException + * \ingroup group_core_debug + * \brief Error that can be emitted by the vpTracker class and its derivatives. */ class VISP_EXPORT vpTrackingException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpTracking member - */ - enum errorTrackingCodeEnum { - featureLostError, - + * \brief Lists the possible error than can be emitted while calling + * vpTracking member + */ + enum errorTrackingCodeEnum + { + featureLostError, //!< Tracker lost feature // Moving edges - notEnoughPointError, - initializationError, - fatalError + notEnoughPointError, //!< Not enough point to track + initializationError, //!< Tracker initialization error + fatalError //!< Tracker fatal error }; public: + /*! + * Constructor. + */ vpTrackingException(int id, const char *format, ...) { this->code = id; @@ -86,7 +76,15 @@ class VISP_EXPORT vpTrackingException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpTrackingException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpTrackingException(int id) : vpException(id) { } }; diff --git a/modules/io/include/visp3/io/vpParallelPortException.h b/modules/io/include/visp3/io/vpParallelPortException.h index 1917504ed6..f7ff7fd38e 100644 --- a/modules/io/include/visp3/io/vpParallelPortException.h +++ b/modules/io/include/visp3/io/vpParallelPortException.h @@ -35,55 +35,40 @@ #ifndef _vpParallelPortException_h_ #define _vpParallelPortException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - /*! - - \file vpParallelPortException.h - - \brief Error that can be emitted by the vpParallelPort class and its - derivates. - -*/ - -/* Classes standards. */ + * \file vpParallelPortException.h + * \brief Error that can be emitted by the vpParallelPort class and its + * derivates. + */ #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ - -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ +#include +#include /*! - \class vpParallelPortException - - \brief Error that can be emitted by the vpParallelPort class and its - derivates. + * \class vpParallelPortException + * + * \brief Error that can be emitted by the vpParallelPort class and its + * derivates. */ class VISP_EXPORT vpParallelPortException : public vpException { public: /*! - \brief Lists the possible errors than can be emitted while calling - vpParallelPort member - */ - enum error { + * \brief Lists the possible errors than can be emitted while calling + * vpParallelPort member + */ + enum error + { opening, /*!< Cannot access to the parallel port device. */ closing /*!< Cannot close the parallel port device. */ }; public: + /*! + * Constructor. + */ vpParallelPortException(int id, const char *format, ...) { this->code = id; @@ -92,7 +77,15 @@ class VISP_EXPORT vpParallelPortException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpParallelPortException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpParallelPortException(int id) : vpException(id) { } }; diff --git a/modules/robot/include/visp3/robot/vpRobotException.h b/modules/robot/include/visp3/robot/vpRobotException.h index 4ce045ab65..28f1d2bc86 100644 --- a/modules/robot/include/visp3/robot/vpRobotException.h +++ b/modules/robot/include/visp3/robot/vpRobotException.h @@ -1,5 +1,4 @@ -/**************************************************************************** - * +/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2023 by Inria. All rights reserved. * @@ -30,100 +29,73 @@ * * Description: * Exception that can be emitted by the vpRobot class and its derivatives. - * -*****************************************************************************/ + */ #ifndef _vpRobotException_h_ #define _vpRobotException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* \file vpRobotException.h - \brief error that can be emitted by the vpRobot class and its derivatives +/*! + * \file vpRobotException.h + * \brief error that can be emitted by the vpRobot class and its derivatives */ -/* Classes standards. */ #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ - -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ +#include +#include /*! - \class vpRobotException - \brief Error that can be emitted by the vpRobot class and its derivatives. + * \class vpRobotException + * \brief Error that can be emitted by the vpRobot class and its derivatives. */ class VISP_EXPORT vpRobotException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpRobot member - */ - enum errorRobotCodeEnum { + * \brief Lists the possible error than can be emitted while calling + * vpRobot member + */ + enum errorRobotCodeEnum + { - /** Erreur lancee par le constructor. */ +//! Error from constructor constructionError, - /** 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. */ + //! Not unique robot object construction uniqueRobotError, - /** Erreur lancee par les fonctions de commande si le - * robot n'est pas dans le bon etat au moment du passage - * d'ordre. */ + //! Wrong robot state wrongStateError, - /** Erreur lancee par les fonctions de changement d'etat - * si le changement demandee n'est pas possible. */ + //! Cannot change robot state stateModificationError, - /** Erreur generee lors d'un retour non nulle d'une fonction - * de communication de la lib Afma6. */ + //! Unable to communicate communicationError, - /** Erreur lancee apres un appel a une fonction de la lib - * bas-niveau de control de l'afma6 ayant renvoye une erreur. */ + //! Error thrown by the low level sdk lowLevelError, - /** Erreur lancee par la fonction de parsing des parametres du - * robot, si le fichier donne en entree n'est pas valide. - */ + //! Cannot parse parameters readingParametersError, - /** 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. */ + //! Cannot initialize the robot notInitializedError, - /** 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'. - */ + //! Functionality not implemented notImplementedError, - /** Position is out of range. - */ + + //! Position is out of range positionOutOfRangeError, - /*! - Signal exception returned after SIGINT (CTRL-C), SIGBUS, SIGSEGV, SIGSEGV (CTRL-\), SIGQUIT. - */ + + //! Signal exception returned after SIGINT (CTRL-C), SIGBUS, SIGSEGV, SIGSEGV (CTRL-\), SIGQUIT. signalException }; public: + /*! + * Constructor. + */ vpRobotException(int id, const char *format, ...) { this->code = id; @@ -132,8 +104,16 @@ class VISP_EXPORT vpRobotException : public vpException setMessage(format, args); va_end(args); } - vpRobotException(int id, const std::string &msg) : vpException(id, msg) {} - explicit vpRobotException(int id) : vpException(id) {} + + /*! + * Constructor. + */ + vpRobotException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ + explicit vpRobotException(int id) : vpException(id) { } }; #endif diff --git a/modules/vision/include/visp3/vision/vpCalibrationException.h b/modules/vision/include/visp3/vision/vpCalibrationException.h index b5d26b1ad5..1b8471e5f9 100644 --- a/modules/vision/include/visp3/vision/vpCalibrationException.h +++ b/modules/vision/include/visp3/vision/vpCalibrationException.h @@ -37,8 +37,8 @@ #include #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include /*! * \class vpCalibrationException diff --git a/modules/vision/include/visp3/vision/vpPoseException.h b/modules/vision/include/visp3/vision/vpPoseException.h index a5b4d51b31..57be1d404d 100644 --- a/modules/vision/include/visp3/vision/vpPoseException.h +++ b/modules/vision/include/visp3/vision/vpPoseException.h @@ -34,51 +34,41 @@ #ifndef _vpPoseException_h_ #define _vpPoseException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* Classes standards. */ - #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ - -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ +#include +#include /*! - \class vpPoseException - \ingroup group_vision_pose - \brief Error that can be emitted by the vpPose class and its derivatives. + * \class vpPoseException + * \ingroup group_vision_pose + * \brief Error that can be emitted by the vpPose class and its derivatives. */ class VISP_EXPORT vpPoseException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpPose member - */ - enum errorCodeEnum { + * Lists the possible error than can be emitted while calling + * vpPose member + */ + enum errorCodeEnum + { + //! Generic pose error poseError, - //! something is not initialized + //! Something is not initialized notInitializedError, - //! function not implemented + //! Function not implemented notImplementedERR, - //! index out of range + //! Index out of range outOfRangeError, + //! Not enough points to compute the pose notEnoughPointError }; public: + /*! + * Constructor. + */ vpPoseException(int id, const char *format, ...) { this->code = id; @@ -87,9 +77,16 @@ class VISP_EXPORT vpPoseException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpPoseException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpPoseException(int id) : vpException(id) { } - // vpPoseException() : vpException() { ;} }; #endif diff --git a/modules/visual_features/include/visp3/visual_features/vpFeatureException.h b/modules/visual_features/include/visp3/visual_features/vpFeatureException.h index b188973a9f..cd76aa0eca 100644 --- a/modules/visual_features/include/visp3/visual_features/vpFeatureException.h +++ b/modules/visual_features/include/visp3/visual_features/vpFeatureException.h @@ -1,5 +1,4 @@ -/**************************************************************************** - * +/* * ViSP, open source Visual Servoing Platform software. * Copyright (C) 2005 - 2023 by Inria. All rights reserved. * @@ -30,58 +29,50 @@ * * Description: * Exception that can be emitted by the vpFeature class and its derivatives. - * -*****************************************************************************/ + */ #ifndef _vpFeatureException_h_ #define _vpFeatureException_h_ -/* ------------------------------------------------------------------------- - */ -/* --- INCLUDE ------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - -/* \file vpFeatureException.h - \brief error that can be emitted by the vpFeature class and its derivatives +/*! + * \file vpFeatureException.h + * \brief error that can be emitted by the vpFeature class and its derivatives */ -/* Classes standards. */ -#include /* Classe std::ostream. */ -#include /* Classe string. */ +#include +#include #include #include -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ - /*! - \class vpFeatureException - \ingroup group_visual_features - \brief Error that can be emitted by the vpBasicFeature class and its - derivates. + * \class vpFeatureException + * \ingroup group_visual_features + * \brief Error that can be emitted by the vpBasicFeature class and its + * derivates. */ class VISP_EXPORT vpFeatureException : public vpException { public: /*! - \brief Lists the possible error than can be emitted while calling - vpFeature member - */ - enum errorFeatureCodeEnum { - //! feature list or desired feature list is empty + * \brief Lists the possible error than can be emitted while calling + * vpFeature member + */ + enum errorFeatureCodeEnum + { +//! Feature list or desired feature list is empty badErrorVectorError, + //! Size mismatch error sizeMismatchError, + //! Feature not initialized notInitializedError, + //! Wrong feature initialization badInitializationError }; public: + /*! + * Constructor. + */ vpFeatureException(int id, const char *format, ...) { this->code = id; @@ -90,7 +81,15 @@ class VISP_EXPORT vpFeatureException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpFeatureException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpFeatureException(int id) : vpException(id) { } }; diff --git a/modules/vs/include/visp3/vs/vpServoException.h b/modules/vs/include/visp3/vs/vpServoException.h index 4aceab9ce6..2615f2ab26 100644 --- a/modules/vs/include/visp3/vs/vpServoException.h +++ b/modules/vs/include/visp3/vs/vpServoException.h @@ -37,37 +37,29 @@ #define _vpServoException_h_ /*! - \file vpServoException.h - \brief error that can be emitted by the vpServo class and its derivatives -*/ + * \file vpServoException.h + * \brief error that can be emitted by the vpServo class and its derivatives + */ #include -#include /* Classe std::ostream. */ -#include /* Classe string. */ - -/* ------------------------------------------------------------------------- - */ -/* --- CLASS --------------------------------------------------------------- - */ -/* ------------------------------------------------------------------------- - */ +#include +#include /*! - \class vpServoException - \brief Error that can be emitted by the vpServo class and its derivatives. - \author Eric Marchand (Eric.Marchand@irisa.fr) Irisa / Inria Rennes + * \class vpServoException + * \brief Error that can be emitted by the vpServo class and its derivatives. */ class VISP_EXPORT vpServoException : public vpException { public: /*! - - \brief Lists the possible error than can be emitted while calling - vpServo member - */ - enum errorServoCodeEnum { - //! Current or desired feature list is empty + * \brief Lists the possible error than can be emitted while calling + * vpServo member + */ + enum errorServoCodeEnum + { +//! Current or desired feature list is empty noFeatureError, //! No degree of freedom is available to achieve the secondary task. noDofFree, @@ -78,6 +70,9 @@ class VISP_EXPORT vpServoException : public vpException }; public: + /*! + * Constructor. + */ vpServoException(int id, const char *format, ...) { this->code = id; @@ -86,7 +81,15 @@ class VISP_EXPORT vpServoException : public vpException setMessage(format, args); va_end(args); } + + /*! + * Constructor. + */ vpServoException(int id, const std::string &msg) : vpException(id, msg) { } + + /*! + * Constructor. + */ explicit vpServoException(int id) : vpException(id) { } };