mirror of
https://github.com/ziglang/zig.git
synced 2024-11-15 08:33:06 +00:00
Merge pull request #6481 from MasterQ32/stage1_error_return_trace
Adds error return trace printing to stage1
This commit is contained in:
commit
49c0cd6e8e
@ -39,7 +39,12 @@ pub export fn main(argc: c_int, argv: [*]const [*:0]const u8) c_int {
|
||||
for (args) |*arg, i| {
|
||||
arg.* = mem.spanZ(argv[i]);
|
||||
}
|
||||
stage2.mainArgs(gpa, arena, args) catch |err| fatal("{}", .{@errorName(err)});
|
||||
stage2.mainArgs(gpa, arena, args) catch |err| {
|
||||
if (@errorReturnTrace()) |trace| {
|
||||
std.debug.dumpStackTrace(trace.*);
|
||||
}
|
||||
fatal("unhandled internal error: {}", .{@errorName(err)});
|
||||
};
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user