diff options
author | 2019-11-05 00:08:52 +0100 | |
---|---|---|
committer | 2019-11-05 00:08:52 +0100 | |
commit | 22e07506cc763caa4b26dbded8b14c466d8d6949 (patch) | |
tree | 73f98f3b1fdff8920669947594417d50e861a095 /src/lib/netlist/plib/pfunction.cpp | |
parent | f315e47b89d62ddfe70a649dc439a80844d144c0 (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/pfunction.cpp')
-rw-r--r-- | src/lib/netlist/plib/pfunction.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/netlist/plib/pfunction.cpp b/src/lib/netlist/plib/pfunction.cpp index 5ac7478e197..44b037e827b 100644 --- a/src/lib/netlist/plib/pfunction.cpp +++ b/src/lib/netlist/plib/pfunction.cpp @@ -79,16 +79,16 @@ namespace plib { bool err(false); rc.m_param = plib::pstonum_ne<decltype(rc.m_param)>(cmd, err); if (err) - throw plib::pexception(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr)); + pthrow<pexception>(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr)); stk += 1; } } if (stk < 1) - throw plib::pexception(plib::pfmt("pfunction: stack underflow on token <{1}> in <{2}>")(cmd)(expr)); + pthrow<pexception>(plib::pfmt("pfunction: stack underflow on token <{1}> in <{2}>")(cmd)(expr)); m_precompiled.push_back(rc); } if (stk != 1) - throw plib::pexception(plib::pfmt("pfunction: stack count different to one on <{2}>")(expr)); + pthrow<pexception>(plib::pfmt("pfunction: stack count different to one on <{2}>")(expr)); } static int get_prio(const pstring &v) @@ -110,7 +110,7 @@ namespace plib { static pstring pop_check(std::stack<pstring> &stk, const pstring &expr) { if (stk.size() == 0) - throw plib::pexception(plib::pfmt("pfunction: stack underflow during infix parsing of: <{1}>")(expr)); + pthrow<pexception>(plib::pfmt("pfunction: stack underflow during infix parsing of: <{1}>")(expr)); pstring res = stk.top(); stk.pop(); return res; |