consistent printing of the error message

This commit is contained in:
Folkert 2023-07-27 18:59:54 +02:00
parent bb97b9ff74
commit f692c8dabf
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -362,7 +362,14 @@ macro_rules! assert_evals_to {
match result.into_result() {
Ok(value) => transform(value),
Err((msg, _tag)) => panic!("Roc failed with message: {msg}"),
Err((msg, tag)) => {
use roc_mono::ir::CrashTag;
match tag {
CrashTag::Roc => panic!(r#"Roc failed with message: "{msg}""#),
CrashTag::User => panic!(r#"User crash with message: "{msg}""#),
}
}
}
}
};