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.

How does the error handling works?

See original GitHub issue

Hey @ansu5555 🤓 ✌️

I noticed there is no error handling on the dependency I’ve tried to use the PDFViewer component but I’m passing a URL (like /my/file/pdf) on the ‘url’ property, this url provides a pdf document itself on the request but if the request response an error, my app crashes due to the PDFViewer lacks of onErrorhandler method.

Do you have any idea how could I handle the error?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yasskatecommented, Nov 28, 2019

Awesome! 😃 Thanks @ansu5555, it works properly.

When I have a chance I’ll send a PR with an improvement for the error handling method, I’d like to create a new prop like ‘onPdfError’ which gets a custom component I think this would be worth, what do you think?

Thanks a lot! 😄

1reaction
ansu5555commented, Nov 27, 2019

Thanks for the mention… I have released the new version with the error handling, please have a look.

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is Exception Handling? - SearchSoftwareQuality
What is exception handling? Exception handling is the process of responding to unwanted or unexpected events when a computer program runs.
Read more >
4. Error Handling - Open Book Project
The theory behind exception handling goes like this: It is possible for code to raise (or throw) an exception, which is a value....
Read more >
How the Exception Handling Works in Java
Step 1: When an error occurs within a method, the method creates an object and hands it off to the runtime system this...
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 >
Control flow and error handling - JavaScript - MDN Web Docs
JavaScript supports a compact set of statements, specifically control flow statements, that you can use to incorporate a great deal of ...
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