Method with throws Exception: Where is it actually handled?
- by Esq
Here is an example code, I am throwing an exception here, it works perfectly fine without the try/catch block of code for some reason.
Do I have to handle this inside this method "EntryDelete"
or
Do I have to handle this where the method is called from?
If so can I see an example, what do I have to import in there? What is the acceptable syntax or method to do this?
public boolean EntryDelete(int entryId) throws SQLException{
this.open();
kDatabase.delete(kENTRY_TABLE, kENTRY_ENTRY_ID + "=" + entryId, null);
this.close();
return true;
}
Thanks