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.

Error handling section content is not related to error/exception

See original GitHub issue

It seems to me that the error handling section is a bit messy. Why are the Use consistent capitalization and Function callers and callees should be close in this section? IMHO, Function callers and callees should be close should be in the Functions section and Use consistent capitalization should be in the naming section.

Also, a lot of developer do not understand the difference between throw e; and throw;. I can write a piece of code about it to fill the Error handling section.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Justbeingjustincommented, Jan 9, 2019

Maybe something like this could be a good start:

The stack trace is preserved with throw;

Bad

try
{
    // code & logic
}
catch (Exception ex)
{
    throw ex;
}

Good

try
{
    // code & logic
}
catch (Exception ex)
{
    throw;
}
0reactions
thangchungcommented, Jan 18, 2019

I closed it for now and move to #35

Read more comments on GitHub >

github_iconTop Results From Across the Web

Laravel won't catch ErrorException
I'm trying to catch an exception when sending an email, but Laravel won't do it. I read that Laravel turns every warning and...
Read more >
Handle errors in ASP.NET Core
Any exception that occurs when the server is handling the request is handled by the server's exception handling.
Read more >
Error Handling - Laravel 10.x - The PHP Framework For ...
When you start a new Laravel project, error and exception handling is already configured for you. The App\Exceptions\Handler class is where all exceptions ......
Read more >
8. Errors and Exceptions — Python 3.11.4 documentation
Errors detected during execution are called exceptions and are not unconditionally fatal: you will soon learn how to handle them in Python programs....
Read more >
Error handling
Stripe offers many kinds of errors. They can reflect external events, like declined payments and network interruptions, or code problems, like invalid API ......
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