mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
[muparser] ParserBase::Eval to return an error instead of throwing
This commit is contained in:
parent
11d729d09c
commit
2f2f4b4287
1 changed files with 4 additions and 1 deletions
|
@ -1470,7 +1470,10 @@ void ParserBase::StackDump(const ParserStack<token_type> &a_stVal,
|
||||||
*/
|
*/
|
||||||
void ParserBase::Eval(std::vector<ValueOrError> *outResult) const {
|
void ParserBase::Eval(std::vector<ValueOrError> *outResult) const {
|
||||||
ValueOrError v = (this->*m_pParseFormula)();
|
ValueOrError v = (this->*m_pParseFormula)();
|
||||||
if (v.has_error()) throw v.error();
|
if (v.has_error()) {
|
||||||
|
outResult->push_back(std::move(v));
|
||||||
|
return;
|
||||||
|
}
|
||||||
int stackSize = m_nFinalResultIdx;
|
int stackSize = m_nFinalResultIdx;
|
||||||
|
|
||||||
// (for historic reasons the stack starts at position 1)
|
// (for historic reasons the stack starts at position 1)
|
||||||
|
|
Loading…
Reference in a new issue