summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-09-09 01:03:15 +0200
committerCarl Hetherington <cth@carlh.net>2021-09-27 13:41:46 +0200
commitdcd9afacd67975a9e20a6d1c4b3998c2890f1c16 (patch)
treeebf27b648019ad1d1554af33172a2f92cec74b74 /src/lib
parent7bebe412366e9156aa908d054d9fa210cc370f92 (diff)
Add new GLError constructor.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exceptions.cc7
-rw-r--r--src/lib/exceptions.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/exceptions.cc b/src/lib/exceptions.cc
index ebb607b94..3f87a2ebe 100644
--- a/src/lib/exceptions.cc
+++ b/src/lib/exceptions.cc
@@ -132,6 +132,13 @@ GLError::GLError (char const* last, int e)
}
+GLError::GLError (char const* message)
+ : runtime_error (message)
+{
+
+}
+
+
CopyError::CopyError (string m, optional<int> n)
: runtime_error (String::compose("%1%2", m, n ? String::compose(" (%1)", *n) : ""))
, _message (m)
diff --git a/src/lib/exceptions.h b/src/lib/exceptions.h
index d0ba1f068..9b7837a46 100644
--- a/src/lib/exceptions.h
+++ b/src/lib/exceptions.h
@@ -378,6 +378,7 @@ class GLError : public std::runtime_error
{
public:
GLError (char const* last, int e);
+ GLError (char const* message);
};