summaryrefslogtreecommitdiff
path: root/src/exceptions.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-18 00:53:52 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-18 00:53:52 +0100
commit4de6f6e4f4df4cc9b28b98188d36082b26e81345 (patch)
treeeb87f040aada25354fc4b526af4dcda2cf6c652d /src/exceptions.h
parenta4902d8ca05a33d5793fcce961086b8c898a3c98 (diff)
Doc tweaks.
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;
};