Utils: Implement more flexible SystemException
[senf.git] / Utils / Exception.cti
index bd89b67..f0be6aa 100644 (file)
 ///////////////////////////////cti.p///////////////////////////////////////
 
 template <int Code>
-prefix_ senf::ErrnoException<Code>::ErrnoException()
-    : SystemException(fixed_code)
+prefix_ senf::ErrnoException<Code>::ErrnoException(std::string const & where)
+    : SystemException(where,fixed_code)
 {}
 
+// I for some reason need to explicitly define this constructor even though it's defined identically
+// to the default version (even though SyntaxException has a custom copy constructor, the
+// non-existent std::stringstream copy constructor will be called otherwise). I believe this is a
+// g++ bug.
 template <int Code>
-prefix_ senf::ErrnoException<Code>::ErrnoException(char const * where)
-    : SystemException(where,fixed_code)
+prefix_ senf::ErrnoException<Code>::ErrnoException(ErrnoException const & other)
+    : SystemException(other)
 {}
 
 /////////////////////////////cti.e///////////////////////////////////////