Yuescript icon indicating copy to clipboard operation
Yuescript copied to clipboard

Output uncaught errors to stderr rather than stdout

Open SkyyySi opened this issue 6 months ago • 1 comments

When using the yue CLI as an interpreter, it currently always pushes error tracebacks to /dev/stdout, when they should actually go to /dev/stderr. This will ensure that errors actually get displayed on the console, instead of being treated as regular output (e.g. when used in a shell pipeline).

Note that this is only relevant for uncaught errors that cause the interpreter to crash, not for errors handled with pcall / xpcall.

SkyyySi avatar May 12 '25 17:05 SkyyySi

Thanks for reporting this! Just to confirm, how were you using the yue CLI as an interpreter—was it via REPL mode, or using yue -e with inline code or filename?

pigpigyyy avatar May 22 '25 07:05 pigpigyyy