ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lieven De Keyzer" <lieven_dekey...@hotmail.com>
Subject SQLException when deleting
Date Mon, 09 May 2005 01:39:59 GMT
This is a snapshot of my AccountSqlMapDao, following the concepts of the 
latest JPetStore.


  public void insertAccount(Account account) {
    insert("insertAccount", account);
  }

  public void updateAccount(Account account) {
    update("updateAccount", account);
  }

  public void deleteAccount(Account account) {
      delete("deleteAccount", account);
  }


I get an error however in deleteAccount:

unreported exception java.sql.SQLException; must be caught or declared to be 
thrown

[javac]     delete("deleteAccount", account);


Why do I need to catch the exception for the delete statement, but not for 
the insert or update method?



Mime
View raw message