Attempting to write to a stream that is no longer in scope.

#6120   Run-time catchable error

Attempting to write to a stream that is no longer in scope.

Explanation

This error occurs when an attempt is made to write to the output stream set and it contains a stream that was an item of a shelf of which scope has been collapsed.