forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: Do not raise exception when you can prevent it (was Re: svn commit: r428677)
Date Fri, 04 Aug 2006 11:22:46 GMT
Thorsten Scherler wrote:
> El vie, 04-08-2006 a las 09:44 +0000, escribió:


> I will change this, if nobody objects. This includes removing all try
> catches surrounding the calling code.

I like to have lots of log messages. Your approach does not change the 
amount of code in use because you if becomes and if...else

Furthermore, testing that the source exists is less efficient than 
dealing with the exception when it does not exist (at least in this case).

However, I'm not -1 on you changing it, only -0 - go for it if you have 
the desire and nobody objects.

> Further I would like to add this to the coding guidelines, that
> exception should be prevented and not using them for debugging.

I'm -1 on defining either as the *only* way to do it. In my opinion both 
are acceptable in different circumstances.


View raw message