question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I 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:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
guillaumearmcommented, Feb 19, 2018

And what about a ramda-adjunct-effects library ? This may be a packages/ramda-adjunct-effects in this repository (the monorepo way) and we could add peek from #38 and so on.

0reactions
Undistractioncommented, Feb 19, 2018

@guillaumearm I like that idea. I think this is a good compromise.

I think log is just a configurable version of peek.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found