mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
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:
@@ -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!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user