Make exception classes have clearer messages
Include the type of exception in the string generated by each
subclass. Also simplify the constructs to what is needed.
diff --git a/common/rdr/Exception.h b/common/rdr/Exception.h
index 62f452b..69abbed 100644
--- a/common/rdr/Exception.h
+++ b/common/rdr/Exception.h
@@ -43,15 +43,11 @@
};
struct TimedOut : public Exception {
- TimedOut(const char* s="Timed out") : Exception("%s", s) {}
+ TimedOut() : Exception("Timed out") {}
};
struct EndOfStream : public Exception {
- EndOfStream(const char* s="End of stream") : Exception("%s", s) {}
- };
-
- struct FrameException : public Exception {
- FrameException(const char* s="Frame exception") : Exception("%s", s) {}
+ EndOfStream() : Exception("End of stream") {}
};
}