summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 21:54:52 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-11-08 21:54:52 +0000
commitc5628db861b753d1eeaf67c2f5c05f4f31d2dfda (patch)
tree96b9adb8450361df1e8060aaa33a71d36c931413
parentAdd exception helper (diff)
downloadlibadhocutil-c5628db861b753d1eeaf67c2f5c05f4f31d2dfda.tar.bz2
libadhocutil-c5628db861b753d1eeaf67c2f5c05f4f31d2dfda.tar.xz
libadhocutil-c5628db861b753d1eeaf67c2f5c05f4f31d2dfda.zip
Add doxygen commentslibadhocutil-0.2.1
-rw-r--r--libadhocutil/exception.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libadhocutil/exception.h b/libadhocutil/exception.h
index a63439b..fd4263c 100644
--- a/libadhocutil/exception.h
+++ b/libadhocutil/exception.h
@@ -6,9 +6,11 @@
#include <boost/optional.hpp>
namespace AdHoc {
+ /// Helper class for lazy creation of exception message text.
template <typename BaseException>
class Exception : public BaseException {
public:
+ /// Override of std::exception::what() to create text as required.
inline const char * what() const throw() override
{
if (!msg) {
@@ -18,6 +20,7 @@ namespace AdHoc {
}
private:
+ /// Message text provider.
virtual std::string message() const throw() = 0;
mutable boost::optional<std::string> msg;
};