summaryrefslogtreecommitdiff
path: root/src/exceptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/exceptions.h')
-rw-r--r--src/exceptions.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/exceptions.h b/src/exceptions.h
index 0dbbec4b..7443db15 100644
--- a/src/exceptions.h
+++ b/src/exceptions.h
@@ -24,6 +24,7 @@
namespace libdcp
{
+/** @brief An exception related to a file */
class FileError : public std::exception
{
public:
@@ -34,30 +35,38 @@ public:
~FileError () throw () {}
+ /** @return error message */
char const * what () const throw () {
return _message.c_str ();
}
+ /** @return filename of file that was involved */
std::string filename () const {
return _filename;
}
private:
+ /** error message */
std::string _message;
+ /** filename of file that was involved */
std::string _filename;
};
+
+/** @brief A miscellaneous exception */
class MiscError : public std::exception
{
public:
MiscError (std::string const & message) : _message (message) {}
~MiscError () throw () {}
+ /** @return error message */
char const * what () const throw () {
return _message.c_str ();
}
private:
+ /** error message */
std::string _message;
};