Skip to content

Commit 00316bf

Browse files
committed
resinator: Fix some error message integration
Fixup for some of the changes in #22522
1 parent 6fa7d5d commit 00316bf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/compiler/resinator/main.zig

+4-4
Original file line numberDiff line numberDiff line change
@@ -183,17 +183,17 @@ pub fn main() !void {
183183
var mapping_results = parseAndRemoveLineCommands(allocator, full_input, full_input, .{ .initial_filename = options.input_filename }) catch |err| switch (err) {
184184
error.InvalidLineCommand => {
185185
// TODO: Maybe output the invalid line command
186-
try renderErrorMessage(stderr.writer(), stderr_config, .err, "invalid line command in the preprocessed source", .{});
186+
try error_handler.emitMessage(allocator, .err, "invalid line command in the preprocessed source", .{});
187187
if (options.preprocess == .no) {
188-
try renderErrorMessage(stderr.writer(), stderr_config, .note, "line commands must be of the format: #line <num> \"<path>\"", .{});
188+
try error_handler.emitMessage(allocator, .note, "line commands must be of the format: #line <num> \"<path>\"", .{});
189189
} else {
190-
try renderErrorMessage(stderr.writer(), stderr_config, .note, "this is likely to be a bug, please report it", .{});
190+
try error_handler.emitMessage(allocator, .note, "this is likely to be a bug, please report it", .{});
191191
}
192192
std.process.exit(1);
193193
},
194194
error.LineNumberOverflow => {
195195
// TODO: Better error message
196-
try renderErrorMessage(stderr.writer(), stderr_config, .err, "line number count exceeded maximum of {}", .{std.math.maxInt(usize)});
196+
try error_handler.emitMessage(allocator, .err, "line number count exceeded maximum of {}", .{std.math.maxInt(usize)});
197197
std.process.exit(1);
198198
},
199199
error.OutOfMemory => |e| return e,

0 commit comments

Comments
 (0)