forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Crossley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FOR-914) [Java Coding] Do not raise exception when you can prevent them
Date Sun, 06 Aug 2006 09:25:14 GMT
    [ http://issues.apache.org/jira/browse/FOR-914?page=comments#action_12426047 ] 
            
David Crossley commented on FOR-914:
------------------------------------

See discussion in thread:
http://www.mail-archive.com/dev@forrest.apache.org/msg10597.html


> [Java Coding] Do not raise exception when you can prevent them
> --------------------------------------------------------------
>
>                 Key: FOR-914
>                 URL: http://issues.apache.org/jira/browse/FOR-914
>             Project: Forrest
>          Issue Type: Improvement
>          Components: Core operations
>    Affects Versions: 0.8-dev
>            Reporter: Thorsten Scherler
>
> I do not like that an exception is not prevented but catched. There are tons of try catch
blocks that are not needed at all if we use a
> cleaner solution.
> IMO it is way cleaner to test e.g. whether the source.exist() before trying to read form
it. This way a FileNotFoundException is prevented and we do not need to catch them.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message