throwError
See original GitHub issueI know this is a contentious one, but I think a throwError
would be a good addition. I fully realise that we should be using the functional approach to avoid the need for throwing, but in many cases, throwing is a necessary part of the API we expose - I’m working on a thin API for use with Styled Components. If the consumer supplies invalid input I need to throw and tell them what the problem is so they can amend the input. It makes no sense here to recover or continue. In this instance I would prefer to a use a well tested throwError
function from this lib than have to bake my own.
const throwError = error => {
throw error;
};
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
throwError - RxJS
A factory function that will create the error instance that is pushed. Returns. Observable<never>. Just errors and does nothing else. throw marble diagram....
Read more >throw - Learn RxJS
//emits an error with specified value on subscription. const source = throwError('This is an error!'); //output: 'Error: This is an error!'.
Read more >Using ThrowError in Angular Observable - TekTutorialsHub
Angular ThrowError operator returns an observable, which on subscription immediately errors out. It does not emit any results.
Read more >RxJS throwError() Creation Operator - Javatpoint
RxJS throwError() operator is a creation operator used to create an observable that returns no items to the observer and immediately emits an...
Read more >ThrowError Operator | Error Handling - RxJS Course
The throwError() operator creates an Observable that emits an error notification immediately upon subscribing. This is particularly useful when we want to ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
And what about a
ramda-adjunct-effects
library ? This may be apackages/ramda-adjunct-effects
in this repository (the monorepo way) and we could addpeek
from #38 and so on.@guillaumearm I like that idea. I think this is a good compromise.
I think log is just a configurable version of peek.