Top "Try-catch" questions

try-catch is a syntactic construct for catching exceptions raised by a code section

Try-catch-finally-return clarification

By reading all the questions already asked in this forum related to the topic above (see title), I thoroughly understand …

java return try-catch finally
Capture keyboardinterrupt in Python without try-except

Is there some way in Python to capture KeyboardInterrupt event without putting all the code inside a try-except statement? I …

python try-catch keyboardinterrupt
PowerShell try/catch/finally

I recently wrote a PowerShell script that works great - however, I'd like to now upgrade the script and add …

powershell try-catch block
C# catch a stack overflow exception

I have a recursive call to a method that throws a stack overflow exception. The first call is surrounded by …

c# try-catch stack-overflow
sql try/catch rollback/commit - preventing erroneous commit after rollback

I am trying to write an MS sql script that has a transaction and a try/catch block. If it …

sql sql-server exception transactions try-catch
How to capture no file for fs.readFileSync()?

Within node.js readFile() shows how to capture an error, however there is no comment for the readFileSync() function regarding …

node.js error-handling try-catch
Should try...catch go inside or outside a loop?

I have a loop that looks something like this: for (int i = 0; i < max; i++) { String myString = ...; float myNum = …

java performance loops try-catch
powershell 2.0 try catch how to access the exception

This is the try catch in PowerShell 2.0 $urls = "http://www.google.com", "http://none.greenjump.nl", "http://www.nu.nl" $…

powershell try-catch
Throwing exceptions in a PHP Try Catch block

I have a PHP function in a Drupal 6 .module file. I am attempting to run initial variable validations prior to …

php exception-handling drupal-6 try-catch
Why are empty catch blocks a bad idea?

I've just seen a question on try-catch, which people (including Jon Skeet) say empty catch blocks are a really bad …

exception-handling try-catch