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.

Replace some try/catch blocks with .catch()

See original GitHub issue

There are quite a few places in the code where try/catch blocks with let variables just outside the try statement can be replaced with the cleaner .catch() method for handling errors.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
neilennscommented, May 27, 2020

Fun times! Thank you.

0reactions
mattbhocommented, May 28, 2020

Sounds good! I’ll keep you updated.

Read more comments on GitHub >

github_iconTop Results From Across the Web

javascript - Replacing then statements with try/catch
I'm having some issues knowing what to do with the then statements. export class WelcomePageContribution implements IWorkbenchContribution { ...
Read more >
How to: Use the Try-Catch Block to Catch Exceptions ...
Use the try block to contain statements that might raise or throw an exception. Place statements to handle exceptions in one or more...
Read more >
Java Catch Multiple Exceptions, Rethrow Exception
Java 7 compiler analyze the complete try block to check what types of exceptions are thrown and then rethrown from the catch block....
Read more >
Try Catch in Java: Exception Handling Example
Learn exception handling, try catch, exception hierarchy and finally block with examples in this tutorial.
Read more >
try...catch - JavaScript - MDN Web Docs - Mozilla
A catch -block contains statements that specify what to do if an exception is thrown in the try -block. If any statement within...
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