For a very long time our Comms have routed errors and stdout output back to the JS side since we didn't see a clear way for them to route their output to the cell the output is displayed in. This PR adds on_error and on_stdout handlers which can process the output as required by the library using them, e.g. Panel will create a display handle for each output which it will route any error messages and stdout output to but other libraries can register a handler to log the output or do whatever else they want to do with it.
For a very long time our Comms have routed errors and stdout output back to the JS side since we didn't see a clear way for them to route their output to the cell the output is displayed in. This PR adds
on_error
andon_stdout
handlers which can process the output as required by the library using them, e.g. Panel will create a display handle for each output which it will route any error messages and stdout output to but other libraries can register a handler to log the output or do whatever else they want to do with it.