diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:53:52 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-18 00:53:52 +0100 |
| commit | 4de6f6e4f4df4cc9b28b98188d36082b26e81345 (patch) | |
| tree | eb87f040aada25354fc4b526af4dcda2cf6c652d /src/exceptions.h | |
| parent | a4902d8ca05a33d5793fcce961086b8c898a3c98 (diff) | |
Doc tweaks.
Diffstat (limited to 'src/exceptions.h')
| -rw-r--r-- | src/exceptions.h | 9 |
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; }; |
