From e9941d29d3d6151e2422d6074802cf753b2135a1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 23 Mar 2024 21:19:04 +0100 Subject: [PATCH] hstream_exception now can contain explanation --- hprint.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hprint.cpp b/hprint.cpp index 78ca8467..a9d1709c 100644 --- a/hprint.cpp +++ b/hprint.cpp @@ -144,7 +144,10 @@ template void hread(hstream& hs, map& a) { template void hwrite(hstream& hs, const C& c, const C1& c1, const CS&... cs) { hwrite(hs, c); hwrite(hs, c1, cs...); } template void hread(hstream& hs, C& c, C1& c1, CS&... cs) { hread(hs, c); hread(hs, c1, cs...); } -struct hstream_exception : hr_exception {}; +struct hstream_exception : hr_exception { + hstream_exception() : hr_exception("hstream_exception") {} + hstream_exception(const std::string &s) : hr_exception(s) {} + }; struct fhstream : hstream { FILE *f;