Last active
September 15, 2019 05:54
-
-
Save altimmons/2e4f521150a39a8161024af862a89c6d to your computer and use it in GitHub Desktop.
Expects a String fileName
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
//code | |
}catch(FileNotFoundException fnfE){ | |
App.log.warning( "FileNotFoundException trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( fnfE.getStackTrace() ) ); | |
}catch( IOException ioE ){ | |
App.log.warning( "IO Exception trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( ioE.getStackTrace() ) ); | |
}catch( IllegalArgumentException iaE ){ | |
App.log.warning( "IllegalArgumentException trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( iaE.getStackTrace() ) ); | |
}catch(SecurityException sE){ | |
App.log.warning( "SecurityException trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( sE.getStackTrace() ) ); | |
}catch(NullPointerException npE){ | |
App.log.warning( "NullPointerException! trying to open file: " + Paths.get( fileName ).toAbsolutePath().toString() ); | |
App.log.warning( String.valueOf( npE.getStackTrace() ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment