cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Set/Read Response Code?
Date Tue, 29 Jan 2008 06:24:16 GMT
Can we see the code?
Can you fix the code?

The Reader needs better handling of errors.  Find the code that
translates the URL into a PDF and make Exceptions return a PDF that
   This is where the PDF from:
   would have been inserted if the following error had not occurred:
   IOException: Could not connect to

You could also write to the command line or a log to inform an
administrator, but explaining the error in the text will allow upset
people to provide something more relevant than variations of "I
received a blank document."

About catching the error before providing a response, have you tried
the usual method of throwing a Java Exception and catching with
<map:handle-errors> in the XMAP?  Which version of Cocoon may also be


On 1/28/08, Edward S <> wrote:
> I have a reader that reads in a XML containing 'x' URL's. Each URL returns a
> PDF and this reader merges the PDF and gives a single PDF as the output.
> Now, if something fails, i get a 0 page pdf with an error saying 'Cannot
> open the pdf because it has 0 pages'
> I have no way to find out, what failed in between (except for checking the
> logs)
> I want to modify it in such a way, that the reader can tell me which url's
> failed.
> So, I thot of nesting the sitemaps and writing a transformer that can go
> thru each URL first and tell me if it returns a valid pdf or not. However,
> for this to work...I need to set the response code in another component to
> failure and read that response code here.
> Any idea how I can do that?
> thanks
> Ed.

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

View raw message