/**
 * @file Error.cpp
 * @author Petr Egert (egertpet@fel.cvut.cz)
 * @brief Contains Error class implementation
 */

#include <iostream>
#include "Error.h"

using namespace std;
using namespace RD;

/**
 * @brief Prints an error to STDERR and returns the supplied result
 * @param text Text to be printed
 * @param result Result to be returned
 * @return Response code given as result
 */
Result ErrorHandler::Error(const std::string &text, Result result)
{
    cerr << "Error: " << text << endl;
    return result;
}

/**
 * @brief Prints an warning to STDERR and returns the supplied result
 * @param text Text to be printed
 * @param result Result to be returned
 * @return Response code given as result
 */
Result ErrorHandler::Warning(const std::string &text, Result result)
{
    cerr << "Warning: " << text << endl;
    return result;
}

/**
 * @brief Prints a notice to STDERR and returns the supplied result
 * @param text Text to be printed
 * @param result Result to be returned
 * @return Response code given as result
 */
Result ErrorHandler::Notice(const std::string &text, Result result)
{
    cerr << "Notice: " << text << endl;
    return result;
}
