Top "Try-catch" questions

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

Javascript: How to catch error on page navigated to using window.location.href = url

I am using a REST service to generate a CSV file that I want to prompt the user to download. …

javascript error-handling try-catch window.location
try-catch-finally with return after it

I know how try, catch & finally work (for most part), but I have one thing I was wondering: what …

java return try-catch try-catch-finally finally
Short notation for coffeescript try/catch

I sometimes write code like: try doSomething() catch e handleError e which is not what nice and clean coffeescript code …

syntax coffeescript try-catch shortcut
Try and Except (TypeError)

What I'm trying to do is create a menu-style start in my program that let's the user choose whether they …

python try-catch typeerror except
How to handle exception without using try catch?

using (SqlConnection con = new SqlConnection()) { try { con.Open(); } catch (Exception ex) { MessageBox.Show(ex.Message); } } This works fine. But I …

c# exception try-catch sqlconnection
Java exception not caught?

I have a small theoretical problem with try-catch constructions. I took a practical exam yesterday about Java and I don't …

java exception try-catch
Java try/catch performance, is it recommended to keep what is inside the try clause to a minimum?

Considering you have code like this: doSomething() // this method may throw a checked a exception //do some assignements calculations doAnotherThing() //…

java performance try-catch readability
If an Exception happens within a using statement does the object still get disposed?

If an Exception happens within a using statement does the object still get disposed? The reason why I'm asking is …

c# exception-handling try-catch using
Why can't control leave a finally statement?

When I place a return inside the block of a finally statement, the compiler tells me: Control cannot leave the …

c# try-catch
Can PowerShell trap errors in GetChildItem and continue looping?

I have a PowerShell script that is recursing down thru the file system using GetChildItem in a for-loop. As it …

powershell try-catch acl