java:exceptions_intro

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
java:exceptions_intro [2015/03/02 16:45]
gthanos [Finaly Block]
java:exceptions_intro [2015/03/02 16:46]
gthanos
Line 182: Line 182:
       }       }
       finally {       finally {
-    ​if( fReader != null) { +        ​if( fReader != null) { 
-      try { +          try { 
-        //​System.out.println("​Closing file"​);​ +            //​System.out.println("​Closing file"​);​ 
-        fReader.close();​ +            fReader.close();​ 
-      }  +          }  
-      catch(IOException ex) { +          catch(IOException ex) { 
-        System.out.println("​IOException occured while reading from file "​+path);​ +            System.out.println("​IOException occured while reading from file "​+path);​ 
-        System.out.println("​Exiting..."​);​ +            System.out.println("​Exiting..."​);​ 
-        System.exit(1);​ +            System.exit(1);​ 
-      +          
-    }+        }
       }       }
       return strDocument.toString();​       return strDocument.toString();​
java/exceptions_intro.txt · Last modified: 2019/04/20 05:02 by gthanos