From 22e07506cc763caa4b26dbded8b14c466d8d6949 Mon Sep 17 00:00:00 2001 From: couriersud Date: Tue, 5 Nov 2019 00:08:52 +0100 Subject: netlist: more consistent exception handling. (nw) Still not optimal, but better than what we had previously. No exception logging comes closer. --- src/lib/netlist/plib/pfunction.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/netlist/plib/pfunction.cpp') 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(cmd, err); if (err) - throw plib::pexception(plib::pfmt("pfunction: unknown/misformatted token <{1}> in <{2}>")(cmd)(expr)); + pthrow(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(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(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 &stk, const pstring &expr) { if (stk.size() == 0) - throw plib::pexception(plib::pfmt("pfunction: stack underflow during infix parsing of: <{1}>")(expr)); + pthrow(plib::pfmt("pfunction: stack underflow during infix parsing of: <{1}>")(expr)); pstring res = stk.top(); stk.pop(); return res; -- cgit v1.2.3-70-g09d2