Is there a way to do this? Using the error handler in a CLI app that talks an IPC protocol over STDIN/STDOUT. Printing a stack trace to STDOUT is a violation of the protocol of course, and there is no reason to do it as it can just print the stack trace to STDERR.