diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-12-13 01:00:37 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-12-13 22:45:54 +0100 |
| commit | 89547a4110fcee9081a22ae206bd4367e736688c (patch) | |
| tree | 29d3227be1a6d2cadb3987f9bfccb2f02a7f94a4 /src/lib/exceptions.h | |
| parent | afb05a1c45a77e5cc251e113b5159bab39b1db6e (diff) | |
Extend NetworkError to take a detail parameter.
Diffstat (limited to 'src/lib/exceptions.h')
| -rw-r--r-- | src/lib/exceptions.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h index 9b7837a46..a8f095c22 100644 --- a/src/lib/exceptions.h +++ b/src/lib/exceptions.h @@ -253,9 +253,19 @@ public: class NetworkError : public std::runtime_error { public: - explicit NetworkError (std::string s) - : std::runtime_error (s) - {} + explicit NetworkError (std::string s, std::string d = ""); + + std::string summary () const { + return _summary; + } + + std::string detail () const { + return _detail; + } + +private: + std::string _summary; + std::string _detail; }; |
