Advertisement
Guest User

Untitled

a guest
May 31st, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. try {
  2. preparedStatementIme.executeUpdate();
  3. preparedStatementTezina.executeUpdate();
  4. } catch (SQLException exception) {
  5. connection.rollback();
  6. if (exception.getMessage().indexOf("checktezina") != -1) {
  7. throw new SQLException("Težina mora biti veća od nule.",
  8. exception.getSQLState(), -746);
  9. } else {
  10. throw exception;
  11. }
  12. }
  13. connection.commit();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement