renderToWriter
Function parameters
Parameters
- w:*Writer
Type definitions in this namespace
Types
- ErrorMessageList
- There will be a MessageIndex for each len at start.
- SourceLocation
- Trailing:
- ErrorMessage
- Trailing:
Functions in this namespace
Functions
- nullTerminatedString
- Given an index into `string_bytes` returns the null-terminated string found there.
Special encoding when there are no errors.
Values
- empty
- Special encoding when there are no errors.
Source
Implementation
pub fn renderToWriter(eb: ErrorBundle, options: RenderOptions, w: *Writer) (Writer.Error || std.posix.UnexpectedError)!void {
if (eb.extra.len == 0) return;
for (eb.getMessages()) |err_msg| {
try renderErrorMessageToWriter(eb, options, err_msg, w, "error", .red, 0);
}
if (options.include_log_text) {
const log_text = eb.getCompileLogOutput();
if (log_text.len != 0) {
try w.writeAll("\nCompile Log Output:\n");
try w.writeAll(log_text);
}
}
}