Top "Exception-handling" questions

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

Python: One Try Multiple Except

In Python, is it possible to have multiple except statements for one try statement? Such as : try: #something1 #something2 except …

python syntax exception-handling
How do I find the stack trace in Visual Studio?

I ask because I couldn't find the stack trace in Visual Studio, while debugging an exception that occurred.

.net visual-studio debugging exception-handling stack-trace
Is it possible in Java to catch two exceptions in the same catch block?

I need to catch two exceptions because they require the same handling logic. I would like to do something like: …

java exception-handling try-catch
Why do we need the "finally" clause in Python?

I am not sure why we need finally in try...except...finally statements. In my opinion, this code block try: …

python exception-handling try-finally
How to get exception message in Python properly

What is the best way to get exceptions' messages from components of standard library in Python? I noticed that in …

python exception exception-handling
When to use throws in a Java method declaration?

So I thought I had a good basic understanding of exception-handling in Java, but I was recently reading some code …

java exception-handling throws
Exception.Message vs Exception.ToString()

I have code that is logging Exception.Message. However, I read an article which states that it's better to use …

c# .net exception exception-handling
Multiple try codes in one block

I have a problem with my code in the try block. To make it easy this is my code: try: …

python exception exception-handling try-catch except
How to efficiently use try...catch blocks in PHP

I have been using try..catch blocks in my PHP code, but I'm not sure if I've been using them …

php exception-handling try-catch
Do you (really) write exception safe code?

Exception handling (EH) seems to be the current standard, and by searching the web, I can not find any novel …

c++ exception-handling