Exception 2005-10-03 - By Kurien Joseph
Back Read the book Effective Java Chapter 8.
-Kurien
-- --Original Message-- -- From: A mailing list for Java(tm) 2 Platform, Enterprise Edition [mailto:J2EE -INTEREST@(protected)] On Behalf Of SUBSCRIBE EJB-INTEREST anonymous Sent: Monday, October 03, 2005 11:14 AM To: J2EE-INTEREST@(protected) Subject: Exception
Hi, Is there any drawback if I perform the below.I throw DataException from B's method, but, didn't catch it explictly in A's method.I am just catching Exception,base class of DataException.
public class A{
public String getData(){ String data = null; try{ B b = new B(); data = b. getData(); } catch(Exception ex){}
return data; }
public class B{
public String getData(){ String strData = null; try{ //get the data and return it } catch(DataException exp) { throw exp; } return strData; } }
==========================================================================To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
==========================================================================To unsubscribe, send email to listserv@(protected) and include in the body of the message "signoff J2EE-INTEREST". For general help, send email to listserv@(protected) and include in the body of the message "help".
|
|