mirror of
https://github.com/libAthena/athena.git
synced 2025-06-05 22:23:35 +00:00
* Add InvalidDataException
This commit is contained in:
parent
b4171a76ad
commit
2731ac3dff
@ -40,7 +40,7 @@ public:
|
||||
/*! \brief The constructor for an IOException
|
||||
* \param message The error message to throw
|
||||
*/
|
||||
IOException(const std::string& message) :
|
||||
inline IOException(const std::string& message) :
|
||||
Exception("IOException: " + message)
|
||||
{}
|
||||
};
|
||||
|
29
include/InvalidDataException.hpp
Normal file
29
include/InvalidDataException.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#ifndef INVALIDDATAEXCEPTION_HPP
|
||||
#define INVALIDDATAEXCEPTION_HPP
|
||||
|
||||
#include "Exception.hpp"
|
||||
|
||||
namespace zelda
|
||||
{
|
||||
namespace error
|
||||
{
|
||||
/*! \class InvalidDataException
|
||||
* \brief An exception thrown on Invalid Data calls.
|
||||
*
|
||||
* This should only be thrown when the library tries to
|
||||
* e.g pass a NULL pointer to a function which requires a valid pointer.
|
||||
* <br />
|
||||
* It is <b>NOT</b> appropriate to use <b>throw new</b> so avoid doing so,
|
||||
* keeping things on the stack as much as possible is very important for speed.
|
||||
*/
|
||||
class InvalidDataException : public Exception
|
||||
{
|
||||
public:
|
||||
inline InvalidDataException(const std::string& error)
|
||||
: Exception("InvalidDataException: " + error)
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // INVALIDDATAEXCEPTION_HPP
|
@ -55,7 +55,8 @@ HEADERS += \
|
||||
$$PWD/include/SpriteFileReader.hpp \
|
||||
$$PWD/include/SpriteFileWriter.hpp \
|
||||
$$PWD/include/SpriteFrame.hpp \
|
||||
$$PWD/include/SpritePart.hpp
|
||||
$$PWD/include/SpritePart.hpp \
|
||||
../libzelda/include/InvalidDataException.hpp
|
||||
|
||||
SOURCES += \
|
||||
$$PWD/src/utility.cpp \
|
||||
|
Loading…
x
Reference in New Issue
Block a user