git.delta.rocks / jrsonnet / refs/commits / a7f8b8fa307d

difftreelog

feat push stack in assertion failure

Yaroslav Bolyukin2021-01-06parent: #ed5873f.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/evaluate.rsdiffbeforeafterboth
555 )?;555 )?;
556 if assertion_result {556 if assertion_result {
557 evaluate(context, returned)?557 evaluate(context, returned)?
558 } else if let Some(msg) = msg {558 } else {
559 push(
560 &value.1,
561 || "assertion failure".to_owned(),
562 || {
563 if let Some(msg) = msg {
559 throw!(AssertionFailed(evaluate(context, msg)?.to_string()?));564 throw!(AssertionFailed(evaluate(context, msg)?.to_string()?));
560 } else {565 } else {
561 throw!(AssertionFailed(Val::Null.to_string()?));566 throw!(AssertionFailed(Val::Null.to_string()?));
562 }567 }
568 },
569 )?
570 }
563 }571 }
564 ErrorStmt(e) => push(572 ErrorStmt(e) => push(
565 loc,573 loc,