Re: [axiom] [axis2] Coding style
Sanjiva Weerawarana <[email protected]>
| Newsgroups | gmane.text.xml.axis.devel,gmane.text.xml.commons.devel |
|---|---|
| Organization | WSO2 Inc. |
| Message-ID | <[email protected]> |
Glen Daniels wrote: > Two comments here. > > 1) Messages should be internationalized and accessed via resource APIs. > Really. At some point we should all stop working on features and take > a few days to hang out and make a serious push to do this across the > board. After that's done we should implement a daily automated scan > (like Axis1 does on each build) across the source to alert us of > non-internationalized messages. +1 .. I thought we had the framework in place for this but if not AC EU would be a great time to get the framework in place. I thought IBM folks had committed something for this but I could be wrong. Fixing each message is going to be an on-going process. > 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() + "." > > and the more informative results, when you are trying to debug > something a year and a half later, will be well worth the time. In > general our fault messages are not informative enough and we need to do > better about helping both the developers and the end users. Definitely +1! > Clearly this particular example isn't any kind of big deal on its own, > but we have this kind of thing all over the place and we should a) begin > working on cleaning it up, and b) be a little more careful when writing > new code. +1 for getting used to this for all new exceptions. > We should consider adding these kinds of things to our coding style > guidelines, IMO. +1 to add 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/