Better handling of errors during function calls.

This commit is contained in:
Stephen Chung
2020-05-13 21:58:38 +08:00
parent 9d8d074940
commit cabceb7498
12 changed files with 97 additions and 75 deletions

View File

@@ -23,7 +23,8 @@ fn test_stack_overflow() -> Result<(), Box<EvalAltResult>> {
) {
Ok(_) => panic!("should be stack overflow"),
Err(err) => match *err {
EvalAltResult::ErrorStackOverflow(_) => (),
EvalAltResult::ErrorInFunctionCall(name, _, _)
if name.starts_with("foo > foo > foo") => {}
_ => panic!("should be stack overflow"),
},
}