summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pstring.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-11-05 00:08:52 +0100
committer couriersud <couriersud@gmx.org>2019-11-05 00:08:52 +0100
commit22e07506cc763caa4b26dbded8b14c466d8d6949 (patch)
tree73f98f3b1fdff8920669947594417d50e861a095 /src/lib/netlist/plib/pstring.h
parentf315e47b89d62ddfe70a649dc439a80844d144c0 (diff)
netlist: more consistent exception handling. (nw)
Still not optimal, but better than what we had previously. No exception logging comes closer.
Diffstat (limited to 'src/lib/netlist/plib/pstring.h')
-rw-r--r--src/lib/netlist/plib/pstring.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/lib/netlist/plib/pstring.h b/src/lib/netlist/plib/pstring.h
index 49905d9c54c..25e79f5bdec 100644
--- a/src/lib/netlist/plib/pstring.h
+++ b/src/lib/netlist/plib/pstring.h
@@ -113,6 +113,7 @@ public:
pstring_t(C (&string)[N]) // NOLINT(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
{
static_assert(N > 0,"pstring from array of length 0");
+ // need std::exception since pexception depends on pstring
if (string[N-1] != 0)
throw std::exception();
m_str.assign(string, N - 1);