cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robby Pelssers" <>
Subject RE: Blocks and error handling
Date Wed, 03 Jun 2009 10:50:17 GMT
I was actually thinking of doing the same thing... so create one block responsible for handling
any exceptions nicely.

Suppose you have a block called 'exceptionhandler'  which contain a service like below:

      <map:match pattern="exceptionhandling-service">
        <map:generate src="service-consumer:"/>
        <map:transform src="exception2xhtml.xslt"/>
        <map:serialize type="xhtml"/>

In your other block you should be able to do something like this but I haven't tested it yet

       <map:generate type="exception"/>
        <map:transform type="servletService">
          <map:parameter name="service" value="servlet:exceptionhandler:/exceptionhandling-service
	 <map:serialize type="xhtml"/>


-----Original Message-----
From: Søren Krum [] 
Sent: Wednesday, June 03, 2009 11:17 AM
Subject: Blocks and error handling


As i am right now hacking a bigger application in smaller pieces (while 
upgrading from cocoon 2.1 to 2.2). While doing so, I would like to 
handle most of the errors (probably all) in one central place.

Did anybody tried out something like "Forwarding Errors" to another 
block? Could that be managed by a redirect which gets the error as a 

Any suggestions or best practise tips?

Søren D. Krum

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message