Passthrough anyerror when using handleOom (#23176)

### What does this PR do?

Previously, handleOom(anyerror!T) would return T and panic for
OutOfMemory for any error. fixes it to return anyerror!T for this case.

### How did you verify your code works?

CI

---------

Co-authored-by: taylor.fish <contact@taylor.fish>
This commit is contained in:
pfg
2025-10-02 14:11:29 -07:00
committed by GitHub
parent d7eebef6f8
commit 2caa5dc8f2
8 changed files with 29 additions and 25 deletions

View File

@@ -861,7 +861,7 @@ pub const CommandLineReporter = struct {
}
const output_writer = Output.errorWriter(); // unbuffered. buffered is errorWriterBuffered() / Output.flush()
bun.handleOom(output_writer.writeAll(output_buf.items[initial_length..]));
output_writer.writeAll(output_buf.items[initial_length..]) catch {};
var this: *CommandLineReporter = buntest.reporter orelse return; // command line reporter is missing! uh oh!