mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 06:14:46 +00:00
consistent printing of the error message
This commit is contained in:
parent
bb97b9ff74
commit
f692c8dabf
1 changed files with 8 additions and 1 deletions
|
@ -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}""#),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue