Top "Try-catch" questions

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

Check if a template exists within a Django template

Is there an out-of-the-box way of checking if a template exists before including it in a Django template? Alternatives are …

django templates try-catch exists
Compile/ Catch an exception

I am having a lot of trouble with this code. The code compiled and ran as it was suppose to …

java exception exception-handling try-catch catch-block
What do I need to close when using PrintWriter in Java

When using a PrintWriter like this : PrintWriter fileOut = new PrintWriter(new BufferedWriter(new FileWriter(csvFileIn))); What do I need to …

java try-catch filewriter printwriter bufferedwriter
How can i catch Event Dispatch Thread (EDT) exceptions?

I am using a class called MyExceptionHandler that implements Thread.UncaughtExceptionHandler to handle normal exceptions in my project. As I …

java exception try-catch event-dispatch-thread
RAISERROR from Catch Block in TSQL Passed to Calling Batch - Need that Passed to Calling Application

I have been researching the TRY/CATCH block and I am a little stumped on how to pass an error …

sql tsql sql-server-2005 try-catch raiserror
Why java does not detect unreachable catch block if I use multiple catch blocks?

Research following method: static private void foo() { try { throw new FileNotFoundException(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.…

java exception try-catch unreachable-code
swift can catch fatal error?

I am trying to use Swift 2.0 try-catch. I originally had the following code override func viewDidLoad() { var obj : Object?; Hi( …

ios swift try-catch fatal-error
Unreachable code compiling without error - How?

From my understanding following code should not compile as the statement "I am unreachable" is after the return. However, When …

java try-catch