db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-1997) Misleading text in WwdEmbedded demo source file for Working With Derby
Date Wed, 08 Jul 2009 12:29:14 GMT

     [ https://issues.apache.org/jira/browse/DERBY-1997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen updated DERBY-1997:
--------------------------------------

         Component/s: Documentation
    Issue & fix info: [Known fix]
             Urgency: Normal

Triaged for 10.5.2.

Working With Derby has now been merged with Getting Started with Derby (DERBY-2390), but the
problematic text is still there - http://db.apache.org/derby/docs/dev/getstart/rwwdactivity3.html.

One alternative way to fix it is to remove the exception reporting methods altogether (both
from code and from docs). I think the reason why they were written in the first place, was
that Java 1.3 didn't have initCause/getCause. But now those methods are available on all supported
platforms, and we use them, so a simple call to printStackTrace() on the top-level exception
should normally show the full exception chain.

> Misleading text in WwdEmbedded demo source file for Working With Derby
> ----------------------------------------------------------------------
>
>                 Key: DERBY-1997
>                 URL: https://issues.apache.org/jira/browse/DERBY-1997
>             Project: Derby
>          Issue Type: Bug
>          Components: Demos/Scripts, Documentation
>    Affects Versions: 10.2.1.6
>            Reporter: Kim Haase
>            Priority: Minor
>
> I'm making some minor fixes to the Working With Derby manual (DERBY-1948, DERBY-1972).
The description of the WwdEmbedded.java program in the HTML generated from the file rwwdactivity3.dita
(http://db.apache.org/derby/docs/dev/workingwithderby/) contains the following paragraph:
> DERBY EXCEPTION REPORTING CLASSES: The two methods at the end of the file, errorPrint
and SQLExceptionPrint, are generic exception reporting routines that can be used with any
JDBC program. This type of exception handling is required because often multiple exceptions
(SQLException) are chained together then thrown. A while loop is used to report on each error
in the chain. These classes are used by calling the errorPrint method from the catch block
of the code that accesses the database.
> The introductory text "DERBY EXCEPTION REPORTING CLASSES" is keyed to a comment with
the same text in the DERBY_HOME/demo/programs/workingwithderby/WwdEmbedded.java program:
>      //   ## DERBY EXCEPTION REPORTING CLASSES  ## 
>     /***     Exception reporting methods
>     **      with special handling of SQLExceptions
>     ***/
> The problem is that there are no Derby exception reporting classes, only methods, as
far as I can tell. The use of the term CLASSES is likely to confuse any users not well acquainted
with Java (one of the target audiences of this manual). It would be great if someone could
change CLASSES to METHODS in the WwdEmbedded.java file so that I can make the corresponding
fix to the rwwdactivity3.dita file. I would also have to correct the confusing last sentence
of the paragraph; I think it would make more sense to say, "The program starts this process
by calling the errorPrint method from the catch block of the code that accesses the database."
(I can't just change "classes" to "methods" because errorPrint *is* one of the methods.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message