Add new GLError constructor.
authorCarl Hetherington <cth@carlh.net>
Wed, 8 Sep 2021 23:03:15 +0000 (01:03 +0200)
committerCarl Hetherington <cth@carlh.net>
Mon, 27 Sep 2021 11:41:46 +0000 (13:41 +0200)
src/lib/exceptions.cc
src/lib/exceptions.h

index ebb607b9476b77f7969f81c3d5f78d18e1a0f68e..3f87a2ebe142893bba046fca25075b7423716faa 100644 (file)
@@ -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)
index d0ba1f068ed23e3f62e3387a3f82dd1fa03df1a7..9b7837a46bef89c695f0be7097a254566b8d8939 100644 (file)
@@ -378,6 +378,7 @@ class GLError : public std::runtime_error
 {
 public:
        GLError (char const* last, int e);
+       GLError (char const* message);
 };