[ http://issues.apache.org/jira/browse/COCOON-1467?page=all ]
Pier Fumagalli updated COCOON-1467: ----------------------------------- Bugzilla Id: (was: 33922) Component: Blocks: Databases (was: Blocks: (Undefined)) Description: the esql logicsheet /src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl has an exception handling block that catches an exception but then just logs the error and does nothing. This is a problem as I need the exception to come out. This is inside the esql:connection template. Here's svn diff for my patch: C:\local>svn diff src\blocks\databases\java\org\apache\cocoon\components\language\markup\xsp\java\esql.xsl Index: src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl =================================================================== --- src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl (revision 46070) +++ src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl (working copy) @@ -306,7 +306,7 @@ <xsl:apply-templates/> } catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/> ) { - getLogger().error("",_esql_exception_<xsl:value-of select="generate-id(.) "/>); + throw new RuntimeException("Error connecting to db to execute query: " + _esql_exception_<xsl:value-of select="generate-id(.)"/>); } finally { try { was: the esql logicsheet /src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl has an exception handling block that catches an exception but then just logs the error and does nothing. This is a problem as I need the exception to come out. This is inside the esql:connection template. Here's svn diff for my patch: C:\local>svn diff src\blocks\databases\java\org\apache\cocoon\components\language\markup\xsp\java\esql.xsl Index: src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl =================================================================== --- src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl (revision 46070) +++ src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl (working copy) @@ -306,7 +306,7 @@ <xsl:apply-templates/> } catch (SQLException _esql_exception_<xsl:value-of select="generate-id(.)"/> ) { - getLogger().error("",_esql_exception_<xsl:value-of select="generate-id(.) "/>); + throw new RuntimeException("Error connecting to db to execute query: " + _esql_exception_<xsl:value-of select="generate-id(.)"/>); } finally { try { > ESQL exception handling problem > ------------------------------- > > Key: COCOON-1467 > URL: http://issues.apache.org/jira/browse/COCOON-1467 > Project: Cocoon > Type: Bug > Components: Blocks: Databases > Versions: 2.1.6 > Environment: Operating System: Windows XP > Platform: PC > Reporter: Oliver Powell > Assignee: Cocoon Developers Team > Priority: Minor > > the esql logicsheet > /src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl > has an exception handling block that catches an exception but then just logs > the > error and does nothing. This is a problem as I need the exception to come out. > This is inside the esql:connection template. Here's svn diff for my patch: > C:\local>svn diff > src\blocks\databases\java\org\apache\cocoon\components\language\markup\xsp\java\esql.xsl > Index: > src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl > =================================================================== > --- > src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl > (revision 46070) > +++ > src/blocks/databases/java/org/apache/cocoon/components/language/markup/xsp/java/esql.xsl > (working copy) > @@ -306,7 +306,7 @@ > <xsl:apply-templates/> > } > catch (SQLException _esql_exception_<xsl:value-of > select="generate-id(.)"/> > ) { > - getLogger().error("",_esql_exception_<xsl:value-of > select="generate-id(.) > "/>); > + throw new RuntimeException("Error connecting to db to execute query: " > + > _esql_exception_<xsl:value-of select="generate-id(.)"/>); > } > finally { > try { -- 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