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;
}
Edit: Whats the thought on handling the exception in both inside and outside the method?
Whats the benefits of handling inside the method, whats the benefits of handling it outside of the method?
Thanks