aboutsummaryrefslogtreecommitdiffstats
path: root/vespalib
diff options
context:
space:
mode:
authorArne Juul <arnej@verizonmedia.com>2021-06-03 14:01:02 +0000
committerArne Juul <arnej@verizonmedia.com>2021-06-04 14:29:00 +0000
commit66acdf136bf805086f9b9d592021999322c8eca9 (patch)
tree129eff56b6a75efb63aa401495bc5301ebedcb83 /vespalib
parent30fde50db70ee02af21c1d2f92096a76a475da1c (diff)
add convenience method
Diffstat (limited to 'vespalib')
-rw-r--r--vespalib/src/vespa/vespalib/util/exception.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/vespalib/src/vespa/vespalib/util/exception.h b/vespalib/src/vespa/vespalib/util/exception.h
index 097ecc131c7..6fb53c035eb 100644
--- a/vespalib/src/vespa/vespalib/util/exception.h
+++ b/vespalib/src/vespa/vespalib/util/exception.h
@@ -216,6 +216,9 @@ public:
/** @brief Returns the msg parameter that this Exception was constructed with */
const string &getMessage() const { return _msg; }
+ /** @brief Returns the message string */
+ const char *message() const { return _msg.c_str(); }
+
/** @brief Returns the location parameter that this Exception was constructed with */
const string &getLocation() const { return _location; }