Change how END_OF_STREAM is thrown