2015-09-06 20:19:09 +02:00
|
|
|
#include "./failure.h"
|
2015-04-22 18:36:40 +02:00
|
|
|
|
|
|
|
namespace ApplicationUtilities {
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* \class ApplicationUtilities::Failure
|
2016-06-10 22:59:22 +02:00
|
|
|
* \brief The Failure class is thrown by an ArgumentParser when a parsing error occurs.
|
2015-04-22 18:36:40 +02:00
|
|
|
*
|
|
|
|
* \sa ApplicationUtilities::ArgumentParser
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Constructs a new Failure.
|
|
|
|
*/
|
|
|
|
Failure::Failure() :
|
|
|
|
m_what("unspecified parsing exception")
|
|
|
|
{}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Constructs a new Failure. \a what is a std::string
|
|
|
|
* describing the cause of the Failure.
|
|
|
|
*/
|
|
|
|
Failure::Failure(const std::string &what) :
|
|
|
|
m_what(what)
|
|
|
|
{}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Destroys the Failure.
|
|
|
|
*/
|
|
|
|
Failure::~Failure() USE_NOTHROW
|
|
|
|
{}
|
|
|
|
|
|
|
|
/*!
|
|
|
|
* Returns a C-style character string describing the cause
|
|
|
|
* of the Failure.
|
|
|
|
*/
|
|
|
|
const char *Failure::what() const USE_NOTHROW
|
|
|
|
{
|
|
|
|
return m_what.c_str();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|