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.

Please forgive me if we’ve already had a discussion on this topic, and I know this is subject to change with the API proposals brewing, but I wanted to capture the state of affairs as of this moment.

Because of the indirection with events.action and events.resolve it’s not possible to catch any errors that are thrown within the execution of an action today. I believe the same will also hold true for the coming hooks API.

It is possible to catch and handle view errors with an HOC.

React 16 is introducing Error Boundaries to handle this problem. I’m not proposing we add anything to core, but wondering what the best practice should be.

Here’s a small demo pen showing view/sync action/async action errors and how one might handle them with an HOA: https://codepen.io/okwolf/pen/rGWpgJ?editors=0010

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:29 (26 by maintainers)

github_iconTop GitHub Comments

5reactions
jorgebucarancommented, Oct 5, 2017

Guys,

What could possibly go wrong?

is a joke. A bad one. 🙇

3reactions
johanalkstalcommented, Oct 5, 2017

h('h1', { onerror: () => console.log("Can't you recognize sarcasm when you see it!?") }, 'What could possible go wrong?')

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Exception Handling? - SearchSoftwareQuality
Exception handling is the process of responding to unwanted or unexpected events when a computer program runs. Exception handling deals with these events...
Read more >
Exception handling - Wikipedia
In computing and computer programming, exception handling is the process of responding to the occurrence of exceptions – anomalous or exceptional conditions ...
Read more >
How to implement complete error handling? - Codegrip
Error handling is when your software is capable to counter or confiscate errors that may have been brought on by a programmer mistake...
Read more >
Control flow and error handling - JavaScript - MDN Web Docs
Exception handling statements. You can throw exceptions using the throw statement and handle them using the try...catch statements.
Read more >
Error handling - Express.js
Error Handling refers to how Express catches and processes errors that occur both synchronously and asynchronously. Express comes with a default error ...
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