throw
signature: throw(error: any, scheduler: Scheduler): Observable
throw(error: any, scheduler: Scheduler): Observable
Emit error on subscription.
Examples
Example 1: Throw error on subscription
( StackBlitz | jsBin | jsFiddle )
Related Examples
Additional Resources
throw 📰 - Official docs
Creation operators: empty, never, and throw 🎥 💵 - André Staltz
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/throwError.ts
Last updated