Yes Reijn
I am using the ExceptionSelector already for catching "page not found"
and "invalid continuation" exceptions :
<exception
class="org.apache.cocoon.ResourceNotFoundException" name="not-found"/>
<exception
class="org.apache.cocoon.components.flow.InvalidContinuationException"
name="invalid-continuation"/>
I noticed further down the errorhandling page you cite, there is mention
of null pointer excpetions :
"A NullPointerException occurs, because something went completely wrong
in the application: All handlers are not configured for such an
exception and so the root sitemaps default handler will apply to it
showing a general error page."
Does this mean it is not possible to configure handlers for this type of
exception and therefore not possible display a customer error page?
The Background
-----------------------
The reason for this query is that I am passing a query string parameter
to a page which pulls in content from an xml file.
For example www.mydomain.com/popup.html?id=11 : This displays a popup
using content stored in a file called 11.xml. If the following is typed
into the browser : www.mydomain.com/popup.html?id=foo there is no xml
content to display because the is no foo.xml file and thus a
NullPointerException is thrown. I would like a "nice" error page to be
display in this instance.
Any ideas gratefully received.
regards
Aron
-----Original Message-----
From: Jeroen Reijn [mailto:[EMAIL PROTECTED]
Sent: 10 May 2006 08:33
To: [email protected]
Subject: Re: Catching a NullPointerException to display custom error
page
Hi Aron,
did you try the read the errorhandling page?
http://cocoon.apache.org/2.1/userdocs/concepts/errorhandling.html
Perhaps you can try the ExceptionSelector.
regards,
Reijn
Aron Shamash wrote:
> Hello
>
> Does anyone know a way to catch NullPointerExceptions which will allow
> the display of a custom error page?
> I would have thought that this could be done in the sitemap but failed
> to find a way.
>
> The application is built using Cocoon 2.1.7
>
>
>
>
>
>
>
>
>
> Aron Shamash
>
> Senior Interface Developer
>
>
>
> Phone 020 7907 4545
>
> *DNA *An Avenue A | Razorfish Company
>
> _www.dna.co.uk_
>
>
--
Met vriendelijke groet,
Kind regards,
Jeroen Reijn
Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel +31 (0)20 5224466
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]