Added tests to ensure that proper behavior occurs when errors are thrown at runtime in various stages of the stream