mirror of
https://github.com/ziglang/zig.git
synced 2025-12-06 06:13:07 +00:00
move std.zig.fatal to std.process.fatal
This commit is contained in:
parent
4f742c4cfc
commit
9d00f69be5
@ -2032,3 +2032,9 @@ pub fn createWindowsEnvBlock(allocator: mem.Allocator, env_map: *const EnvMap) !
|
|||||||
i += 1;
|
i += 1;
|
||||||
return try allocator.realloc(result, i);
|
return try allocator.realloc(result, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Logs an error and then terminates the process with exit code 1.
|
||||||
|
pub fn fatal(comptime format: []const u8, format_arguments: anytype) noreturn {
|
||||||
|
std.log.err(format, format_arguments);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
|||||||
@ -667,10 +667,8 @@ pub fn parseTargetQueryOrReportFatalError(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn fatal(comptime format: []const u8, args: anytype) noreturn {
|
/// Deprecated; see `std.process.fatal`.
|
||||||
std.log.err(format, args);
|
pub const fatal = std.process.fatal;
|
||||||
std.process.exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Collects all the environment variables that Zig could possibly inspect, so
|
/// Collects all the environment variables that Zig could possibly inspect, so
|
||||||
/// that we can do reflection on this and print them with `zig env`.
|
/// that we can do reflection on this and print them with `zig env`.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user