Last active
August 29, 2015 14:05
-
-
Save up1/17baf2a263f40623e7f4 to your computer and use it in GitHub Desktop.
Java :: Check vs Uncheck Exception
This file contains 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
public void insert() throws Exception{ | |
try { | |
preparedStatement = connection.createPreparedStatement(sql); | |
preparedStatement.executeQuery(); | |
}catch(SQLException exception) { | |
throw new Exception( exception ); | |
} | |
} |
This file contains 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
public void insert() { | |
try { | |
preparedStatement = connection.createPreparedStatement(sql); | |
preparedStatement.executeQuery(); | |
}catch(SQLException exception) { | |
throw new InsertException( exception ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment