Top "Exception-handling" questions

An exception is an unusual condition that requires deviation from the program's normal flow.

Need to handle uncaught exception and send log file

UPDATE: Please see "accepted" solution below When my app creates an unhandled exception, rather than simply terminating, I'd like to …

android exception-handling logcat
How to use ELMAH to manually log errors

Is it possible to do the following using ELMAH? logger.Log(" something"); I'm doing something like this: try { // Code that …

c# exception-handling elmah error-logging
ASP.NET Web API: Non-descriptive 500 Internal Server Error

As title says, I’ve got 500 Internal Server Error from GET request to an IQueryable action. The body of the …

exception-handling asp.net-web-api
Try/catch in Java

Could someone please give me a hint why this try and catch is not working? It throws a scanner exception …

java exception exception-handling try-catch java.util.scanner
How does "do something OR DIE()" work in PHP?

I'm writing a php app to access a MySQL database, and on a tutorial, it says something of the form …

php mysql exception-handling conditional
Use tryCatch skip to next value of loop upon error?

I've read a few other SO questions about tryCatch and cuzzins, as well as the documentation: Exception handling in R …

r error-handling exception-handling try-catch
How to log python exception?

How can I log an exception in Python? I've looked at some options and found out I can access the …

python exception-handling logging
Why is try {...} finally {...} good; try {...} catch{} bad?

I have seen people say that it is bad form to use catch with no arguments, especially if that catch …

c# .net exception-handling try-catch try-catch-finally
How to use RSpec's should_raise with any kind of exception?

I'd like to do something like this: some_method.should_raise <any kind of exception, I don't care> …

ruby-on-rails ruby exception-handling rspec
Is it a bad practice to catch Throwable?

Is it a bad practice to catch Throwable? For example something like this: try { // Some code } catch(Throwable e) { // handle …

java exception-handling throwable