| author | |
| committer | |
| log | 9d00f69be58e7b807e26ba8a38050dd486d487f4 |
| tree | cd3f0601527f3884df3f21dbe8b18c4bbea73a76 |
| parent | 4f742c4cfc3c3134a0d6ebfdfc354286ae97b2c1 |
2 files changed, 8 insertions(+), 4 deletions(-)
lib/std/process.zig+6| ... | ... | @@ -2032,3 +2032,9 @@ pub fn createWindowsEnvBlock(allocator: mem.Allocator, env_map: *const EnvMap) ! |
| 2032 | 2032 | i += 1; |
| 2033 | 2033 | return try allocator.realloc(result, i); |
| 2034 | 2034 | } |
| 2035 | ||
| 2036 | /// Logs an error and then terminates the process with exit code 1. | |
| 2037 | pub fn fatal(comptime format: []const u8, format_arguments: anytype) noreturn { | |
| 2038 | std.log.err(format, format_arguments); | |
| 2039 | exit(1); | |
| 2040 | } |
lib/std/zig.zig+2-4| ... | ... | @@ -667,10 +667,8 @@ pub fn parseTargetQueryOrReportFatalError( |
| 667 | 667 | }; |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | pub fn fatal(comptime format: []const u8, args: anytype) noreturn { | |
| 671 | std.log.err(format, args); | |
| 672 | std.process.exit(1); | |
| 673 | } | |
| 670 | /// Deprecated; see `std.process.fatal`. | |
| 671 | pub const fatal = std.process.fatal; | |
| 674 | 672 | |
| 675 | 673 | /// Collects all the environment variables that Zig could possibly inspect, so |
| 676 | 674 | /// that we can do reflection on this and print them with `zig env`. |