java - Are Runtime Exceptions thrown even when they have been caught? -
i have method writes in database if not able write in database catch runtime
exception using exception class
.
public fun() { try { writeindb(....); } catch(exception e) { //log event } }
now have function calling function fun()
catches exception , based on outcome sends message client whether successful or not. e.g.:
funa() { try { fun(); } catch(exception e) { //send message user } }
i have doubt here since in fun()
have caught runtime exception funa
able know exception has occurred, may send right message.
if caught exception in fun(), funa() wont able recognize it. able catch if fun() throws it
Comments
Post a Comment