CREATE ERROR OUTPUT STREAM stream_identifier
;
An Error Output Stream is a special purpose stream that serves as application-level throw mechanism for runtime errors caught by the application's Error Input Stream (if any), or caught by any Error Ports placed on operators or adapters in the containing application or module.
In StreamSQL, use the CREATE ERROR OUTPUT STREAM statement to define an Error Output Stream for the current application or module. There can be any number of Error Output Streams in the same application or module, but all such streams flow to the single error output for the containing application or module. The error output of a module flows to the Error Input Stream of any containing module, then up to the containing application, then to the StreamBase Server running the application.
See Using Error Ports and Error Streams for a general introduction to Error Streams.