/**
 * @file Error.h
 * @author Petr Egert (egertpet@fel.cvut.cz)
 * @brief Contains Result enumerations and ErrorHandler class declaration
 */

#ifndef ERROR_H
#define ERROR_H

#include <string>
#include <list>

namespace RD
{
    /**
     * @brief Enum of the possible return codes
     */
    enum Result
    {
        RES_OK = 0,             ///< No error occured
        RES_WARNING = 0,        ///< A warning was issued. Change this to non-zero value to treat warnings as errors
        RES_NOTICE = 0,         ///< A notice was issued. Change this to non-zero value to treat notices as errors
        RES_ERROR = 1,          ///< A generic error
        RES_ERROR_ABSTRACT,     ///< Abstract method was called
        RES_INVALID_HANDLE,     ///< Invalid handle supplied (ie. NULL pointer)
        RES_ALREADY_EXISTS,     ///< The requested operation is not necessary
        RES_NOT_FOUND,          ///< Resource not found (ie. file)
        RES_MISSING_PARAM       ///< Missing param to a function call
    };

    /**
     * @brief Static class used to handle errors and print debug output
     */
    class ErrorHandler
    {
        public:
            ///Default constructor, currently does nothing
            ErrorHandler(){}

            ///Default destructor, currently does nothing
            ~ErrorHandler(){}

            static Result Error(const std::string &text, Result result = RES_ERROR);
            static Result Warning(const std::string &text, Result result = RES_WARNING);
            static Result Notice(const std::string &text, Result result = RES_NOTICE);

        protected:

        private:


    };
};

#endif // ERROR_H

