axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sanjiva Weerawarana <sanj...@opensource.lk>
Subject Re: [axiom] [axis2] Coding style
Date Wed, 07 Mar 2007 06:04:48 GMT
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message