[Pharo-project] Improving Pharo's Exception Hierarchy

Hernan Wilkinson hernan.wilkinson at 10pines.com
Wed Apr 13 19:15:57 CEST 2011


I think it is not a good idea to use the prefix Exception. We do not use the
word "exception" in real life, so we should not do it on our systems.
About the proposed hierarchy, the problem with having specific exceptions is
that they are important for those who catch them, not for those who signal
them. For example, besides the name, what is the difference between
KeyNotFound or ValueNotFound? none. So, I think that the exception hierarchy
should be grown from it uses, not created based on how or where they are
signaled.

my 2 cents :-)

On Wed, Apr 13, 2011 at 1:55 PM, Miguel Cobá <miguel.coba at gmail.com> wrote:

> El mié, 13-04-2011 a las 14:52 +0200, Camillo Bruni escribió:
>
> > And as Mariano pointed out, there should be a convention on the
> > naming: I am still not sure about suffixing the exception classes with
> > "Exception", but I guess this is a good thing to do. Though I must say
> > that I omitted it so far ;) and just put the verb there, but that can
> > be easily changed.
>
> I would say no to suffixes. Analogous to announcements, they shouldn't
> have the suffix. The name should be descriptive enough and intention
> revealing that the suffix isn't needed in most cases. For example, I
> think that
>
> DividedByZero
>
> is better than
>
> DividedByZeroException
>
> and no information is lost with the sorter name. Instead, DivideByZero
> isn't clear enough to indicate that is a event that happened.
>
> What do you think?
>
> --
> Miguel Cobá
> http://twitter.com/MiguelCobaMtz
> http://miguel.leugim.com.mx
>
>
>
>
>


-- 
*Hernán Wilkinson
Agile Software Development, Teaching & Coaching
Mobile: +54 - 911 - 4470 - 7207
email: hernan.wilkinson at 10Pines.com
site: http://www.10Pines.com <http://www.10pines.com/>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20110413/145556db/attachment.htm>


More information about the Pharo-project mailing list