tagparser/exceptions.cpp

204 lines
4.3 KiB
C++
Raw Normal View History

2015-09-06 19:57:33 +02:00
#include "./exceptions.h"
2015-04-22 19:22:01 +02:00
using namespace std;
namespace TagParser {
2015-04-22 19:22:01 +02:00
/*!
* \class TagParser::Failure
2015-04-22 19:22:01 +02:00
* \brief The class inherits from std::exception and serves as base class for exceptions
* thrown by the elements of the Media namespace.
*/
/*!
* \brief Constructs a new exception.
*/
Failure::Failure() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
Failure::~Failure() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *Failure::what() const USE_NOTHROW
{
return "unable to parse given data";
}
/*!
* \class TagParser::NoDataFoundException
2015-04-22 19:22:01 +02:00
* \brief The exception that is thrown when the data to be parsed holds no
* parsable information.
*/
/*!
* \brief Constructs a new exception.
*/
NoDataFoundException::NoDataFoundException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
NoDataFoundException::~NoDataFoundException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *NoDataFoundException::what() const USE_NOTHROW
{
return "no parsable data has been found";
}
/*!
* \class TagParser::InvalidDataException
2015-04-22 19:22:01 +02:00
* \brief The exception that is thrown when the data to be parsed or to be made seems
* invalid and therefore can not be parsed.
*/
/*!
* \brief Constructs a new exception.
*/
InvalidDataException::InvalidDataException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
InvalidDataException::~InvalidDataException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *InvalidDataException::what() const USE_NOTHROW
{
return "data to be parsed or to be made seems to be invalid";
}
/*!
* \class TagParser::TruncatedDataException
2015-04-22 19:22:01 +02:00
* \brief The exception that is thrown when the data to be parsed is truncated
* and therefore can not be parsed at all.
*/
/*!
* \brief Constructs a new exception.
*/
TruncatedDataException::TruncatedDataException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
TruncatedDataException::~TruncatedDataException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *TruncatedDataException::what() const USE_NOTHROW
{
return "data to be parsed seems to be truncated";
}
/*!
* \class TagParser::OperationAbortedException
2015-04-22 19:22:01 +02:00
* \brief The exception that is thrown when an operation has been stopped
2015-10-16 21:46:36 +02:00
* and thus not successfully completed because it has been aborted.
2015-04-22 19:22:01 +02:00
*/
/*!
* \brief Constructs a new exception.
*/
OperationAbortedException::OperationAbortedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
OperationAbortedException::~OperationAbortedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *OperationAbortedException::what() const USE_NOTHROW
{
return "operation has been aborted";
}
/*!
* \class TagParser::VersionNotSupportedException
2015-04-22 19:22:01 +02:00
* \brief The exception that is thrown when an operation fails because the
* detected or specified version is not supported by the implementation.
*/
/*!
* \brief Constructs a new exception.
*/
VersionNotSupportedException::VersionNotSupportedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
VersionNotSupportedException::~VersionNotSupportedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *VersionNotSupportedException::what() const USE_NOTHROW
{
return "the version of the data to be parsed is not supported";
}
/*!
* \class TagParser::NotImplementedException
2015-04-22 19:22:01 +02:00
* \brief This exception is thrown when the an operation is invoked that has not
* been implemented yet.
*/
/*!
* \brief Constructs a new exception.
*/
NotImplementedException::NotImplementedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Destroys the exception.
*/
NotImplementedException::~NotImplementedException() USE_NOTHROW
2018-03-07 01:17:50 +01:00
{
}
2015-04-22 19:22:01 +02:00
/*!
* \brief Returns a C-style character string describing the cause of the exception.
*/
const char *NotImplementedException::what() const USE_NOTHROW
{
return "the operation has not been implemented yet";
}
2018-03-07 01:17:50 +01:00
} // namespace TagParser