-
Notifications
You must be signed in to change notification settings - Fork 108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Error Handler #367
Comments
Hi @OliverLeighC, Thank you for contacting us! You should be able to achieve the same behavior with our wrapper. The problem might be related directly with Highcharts. Which Highcharts version do you use? As yo can see in this issue: highcharts/highcharts#13549 Working example with Highcharts 7 and You can also consider debugger mode: https://www.highcharts.com/docs/advanced-chart-features/debugger-mode Best regards! |
Thanks for responding! I am on version 10 of highcharts, I tried updating your codesandbox to the latest version and then using the error handling example from here highcharts/highcharts#13549 (comment) (uses the new displayError method) but it doesn't work. https://codesandbox.io/s/highcharts-react-demo-forked-3nf51r?file=/demo.jsx |
Hi @OliverLeighC, You need to use the new events structure:
Live demo: https://codesandbox.io/s/highcharts-react-demo-ich1ee?file=/demo.jsx |
Sorry I don't think my codesandbox saved last time so I sent the wrong thing, this is what I meant to send https://codesandbox.io/s/highcharts-react-demo-forked-udpibx?file=/demo.jsx It still crashes, it doesn't actually catch the error
|
You need to add the event on |
@ppotaczek can you please look into my issue? i followed what you mentioned above but i am not able to trigger my own UI when highcharts throws error. |
In the highchart library you can override the error handler by overwriting the Highcharts.error function (receives code, stop, and chart), but I haven't been able to get this to work with the react highchart wrapper.
Is there a way to capture the errors thrown by highcharts when using the react wrapper? Basically I want to be able to catch the error so I can display a better error message to the user rather than having the whole page crash with the full stack trace.
The text was updated successfully, but these errors were encountered: