Eran Chinthaka wrote:
2) When generating exceptions like this, it really isn't very useful to
say "received some other implementation" or "value wasn't what was
expected".  It's much more helpful to actually put the problem value
into the exception.... In this case it only takes an extra moment to code

   "but received " + reason.getClass() + "."


1000 appologies for this code written by me some time back. Won't happen
again :(.

Its not about the code you wrote at all .. its about a pattern of development that *EVERYONE* should follow: when throwing an exception give all the potentially useful info to the developer. Do not swallow any of it.

Sanjiva.
--
Sanjiva Weerawarana, Ph.D.
Founder & Director; Lanka Software Foundation; http://www.opensource.lk/
Founder, Chairman & CEO; WSO2, Inc.; http://www.wso2.com/
Director; Open Source Initiative; http://www.opensource.org/
Member; Apache Software Foundation; http://www.apache.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to