(alias) _observableThrow(error: any): Observable (+2 overloads)
import _observableThrow
Returns an observable that will error with the specified error immediately upon subscription.
@param error — The error instance to emit
@deprecated
Support for passing an error value will be removed in v8. Instead, pass a factory function to throwError(() => new Error('test')). This is because it will create the error at the moment it should be created and capture a more appropriate stack trace. If for some reason you need to create the error ahead of time, you can still do that: const err = new Error('test'); throwError(() => err);.
(alias) _observableThrow(error: any): Observable (+2 overloads)
import _observableThrow
Returns an observable that will error with the specified error immediately upon subscription.
@param error — The error instance to emit
@deprecated
Support for passing an error value will be removed in v8. Instead, pass a factory function to throwError(() => new Error('test')). This is because it will create the error at the moment it should be created and capture a more appropriate stack trace. If for some reason you need to create the error ahead of time, you can still do that: const err = new Error('test'); throwError(() => err);.