better abort() implementation for windows

in debug mode, it spawns the debugger
This commit is contained in:
Andrew Kelley 2017-10-10 20:34:12 -04:00
parent 1f28d641c0
commit 717e791db2

View File

@ -109,7 +109,10 @@ pub coldcc fn abort() -> noreturn {
while (true) {}
},
Os.windows => {
windows.ExitProcess(1);
if (builtin.mode == builtin.Mode.Debug) {
@breakpoint();
}
windows.ExitProcess(3);
},
else => @compileError("Unsupported OS"),
}