cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <>
Subject [C2] xsp.xsl/devel code
Date Tue, 17 Oct 2000 12:18:43 GMT
Hi All,

	Hope everything is going well!

	Recently I've been porting some C1 XSP code over to C2 that uses a
	several external classes we've written here for our web application.

	One difference I've noticed is that the generated C2 XSP code does not
	wrap up developer XSP logic code within a try/catch block like in C1.

	In C1, the generated 'populateDocument()' method throws type
	Exception; in effect allowing the developer handle exceptions they
	want to and/or let others fall through to the error handling
	capabilities of Cocoon.

	C2 has no such support (yet?), requiring the developer to handle all
	possible exceptions their code may throw (the C2 generated 'generate'
	method can only throw SAXException).

	My question is, was there a discussion/reason behind this decision ?
	or was it just the way it happened ? :-)

	I've attached a patch which adds a global try block to the C2
	generated 'generate' method, which catches any developer caused
	It repackages them up as ProcessingException's (maybe another name
	might be better ?) and re-throws them so that Cocoon's inbuilt
	handling takes care of them. It catches Throwable so that Errors and
	Exceptions are both handled.

	Now, I can understand reasons not to do this, but I can also understand
	reasons to do this, so maybe my patch is not appropriate ? Hence my
	question above.
	What is everyone else's thoughts ?



     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email :
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750

View raw message