Makes sure that listeners always receive the error event of a stream, even if it was thrown before the listener was attached. If the input is already guarded nothing will happen.
Stream that can potentially throw an error.
The stream.
Determines whether the stream is guarded from emitting errors.
A stream that is guarded from emitting errors when there are no listeners. If an error occurs while no listener is attached, it will store the error and emit it once a listener is added (or a timeout occurs).