mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-09 23:48:31 +08:00
A Console instance over process stdio passed a patched write the line and an error handler, and discarded what the write threw, whatever its ignoreErrors setting. Node's kWriteToConsole does that only with ignoreErrors (the default, and the global console). With ignoreErrors false, from the options or the third constructor argument, it calls stream.write(line) alone and lets a throw propagate out of the console method. The console write path now takes the instance's ignoreErrors, so such an instance passes only the line and keeps the write's exception pending. Instances bound to other streams already followed the setting.