[ 
http://jira.dspace.org/jira/browse/DS-351?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=10771#action_10771
 ] 

Stuart Lewis commented on DS-351:
---------------------------------

In the meeting this morning it was decided to leave this issue open for further 
debate, and to consider creating coding standards for DSpace. Sometimes empty 
catches are fine (in this case the catch is just catching the fact that the 
statement may already be closed), but where this is the case, an explanation 
needs to be given in coding comments to justify this.

[09:26am] bradmc: DS-351:  extra min
[09:26am] stuartlewis: e.g. Are we happy that this sort of catch is just there 
to catch if the statement has already been closed, or does it need further 
handling?
[09:27am] mdiggory: DS-351 "Ban" is harsh, there may be places where it 
acceptable to just continue without issue
[09:27am] lcs: it ought to have an explanation of why it's OK to do nothing.
[09:27am] bradmc: +1 lcs
[09:27am] mdiggory: agree
[09:27am] tdonohue: it might be worth broader discussion about conventions/best 
practices...
[09:27am] stuartlewis: This is probably a bigger debate - needs whole meeting 
itself for coding conventions and quality standards.
[09:27am] mhwood: +1 lcs
[09:27am] stuartlewis: So how do we handle this in JIRA now?
[09:27am] lcs: +1 stuartlewis -- though there are sorta-loose conventions now.
[09:27am] stuartlewis:  Leave the issue open, or close saying we'll revisit, 
etc?
[09:27am] mdiggory: Its not a fix...
[09:27am] bradmc: DS-351:  Add note indicating a discussion is warranted.
[09:28am] mdiggory: Its a comment
[09:28am] kshepherd: seems like the sort of thing that should be in a 
developers guide or the wiki
[09:28am] kshepherd: the "if you have an empty catch, explain why" convention, 
that is
[09:28am] bradmc: DS-351:  Keep it open until discussion, or we add to 
someplace that we can stick a link to.

> Ban empty catches from the code
> -------------------------------
>
>                 Key: DS-351
>                 URL: http://jira.dspace.org/jira/browse/DS-351
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: DSpace API
>            Reporter: Flávio Botelho
>
> Just an example, DatabaseManager, lines 1369-1371
>                 catch (SQLException sqle)
>                 {
>                 }
> Only in very rare cases empty catches are acceptable, and of course with 
> accompanying commentaries.
> It's possible to change this to an Error in Eclipse to easy the spotting of 
> them.

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

       

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to