mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
nicer error when roc crashes in fx test platform
This commit is contained in:
parent
c75a09fe67
commit
aa77fdd80c
1 changed files with 2 additions and 1 deletions
|
|
@ -54,7 +54,8 @@ fn rocExpectFailedFn(roc_expect: *const builtins.host_abi.RocExpectFailed, env:
|
|||
fn rocCrashedFn(roc_crashed: *const builtins.host_abi.RocCrashed, env: *anyopaque) callconv(.c) noreturn {
|
||||
_ = env;
|
||||
const message = roc_crashed.utf8_bytes[0..roc_crashed.len];
|
||||
@panic(message);
|
||||
std.fs.File.stderr().deprecatedWriter().print("\n\x1b[31mRoc crashed:\x1b[0m {s}\n", .{message}) catch {};
|
||||
std.process.exit(1);
|
||||
}
|
||||
|
||||
// External symbols provided by the Roc runtime object file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue