Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 6, 2010, 3:51:29 PM (14 years ago)
Author:
rgrieder
Message:

Added Doxygen documentation for ExprParser, MathConvert, OrxEnum, OrxAssert and TriBool.
Adjusted Doxygen documentation for Clock and Exception.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/doc/src/libraries/util/Exception.h

    r7297 r7367  
    3131@brief
    3232    Declaration of facilities to handle exceptions.
     33@details
     34    Any exception thrown should inherit from orxonox::Exception. There is a macro
     35    \ref CREATE_ORXONOX_EXCEPTION to create a new exception (you can find a list of
     36    available exceptions in the docs of this file). <br>
     37    Throwing exception is also very simple:
     38    @code
     39        ThrowException(General, "Something went wrong");
     40    @endcode
     41    (\c General is a type of exception, see docs of this file) <br>
     42    The exception will automatically contain information about file, line number
     43    and function name it occurred in. <br><br>
     44    There is also some magic you can do for numbers, etc.:
     45    @code
     46        ThrowException(General, "Error code: " << myInt << ". more info...");
     47    @endcode
     48    It works with an std::ostringstream, so you can feed it all sorts of values.
    3349*/
    3450
     
    4561namespace orxonox
    4662{
    47     /**
    48     @brief
    49         Base class for all exceptions (derived from std::exception).
     63    /** Base class for all exceptions (derived from std::exception).
    5064    @details
    5165        This class provides support for information about the file, the line
    52         and the function the error occured.
     66        and the function the error occurred.
     67    @see Exception.h
    5368    */
    5469    class _UtilExport Exception : public std::exception
     
    7489        //! Needed for compatibility with std::exception
    7590        virtual ~Exception() throw() { }
     91        //! Returns the error description
    7692        const char* what() const throw();
    7793
    78         //! Returns a full description with type, line, file and function
     94        /** Returns a full description with type, line, file and function
     95        @remarks
     96            The composed full description gets stored to fullDescription_. But for compliance
     97            with std::exception, this method has to be const. Hence fullDescription_ is declared
     98            as mutable.
     99        */
    79100        virtual const std::string& getFullDescription() const;
    80101        //! Returns the string name of the exception type
     
    107128    };
    108129
    109 //! Creates a new type of exception that inherits from tracker::Exception
     130//! Creates a new type of exception that inherits from orxonox::Exception
    110131#define CREATE_ORXONOX_EXCEPTION(ExceptionName)                                     \
    111132    class ExceptionName##Exception : public Exception                               \
     
    129150    // Creates all possible exception types.
    130151    // If you want to add a new type, simply copy and adjust a new line here.
    131 #ifndef DOXYGEN_SHOULD_SKIP_THIS
    132152    CREATE_ORXONOX_EXCEPTION(General);
    133153    CREATE_ORXONOX_EXCEPTION(FileNotFound);
     
    142162    CREATE_ORXONOX_EXCEPTION(NoGraphics);
    143163    CREATE_ORXONOX_EXCEPTION(AbortLoading);
    144 #endif
    145164
    146     /**
    147     @brief
    148         Helper function that forwards an exception and displays the message.
     165    /** Helper function that forwards an exception and displays the message.
    149166    @details
    150167        This is necessary because only when using 'throw' the objects storage is managed.
     
    158175    }
    159176
    160 /**
    161 @brief
    162     Throws an exception and logs a message beforehand.
     177/** Throws an exception and logs a message beforehand.
    163178@param type
    164179    Type of the exception as literal (General, Initialisation, etc.)
    165180@param description
    166181    Exception description as string
     182@see Exception.h
    167183*/
    168184#define ThrowException(type, description) \
Note: See TracChangeset for help on using the changeset viewer.