[Grok-dev] Re: How do I mimick the standard_error_page of Zope
sebastian at urbantalk.se
Thu Sep 20 03:04:17 EDT 2007
I don't seem to get this right. I was hoping that this grok.View
class would be called whenever the INotFound exception was thrown
(thus redirecting to the Index view of that exception). But all I get
is the Rotterdam skin.
return "There was an error finding the resource you were
18 sep 2007 kl. 23.50 skrev Philipp von Weitershausen:
> Leonardo Rochael Almeida wrote:
>> Perhaps something like this would work (untested)?
>> class NotFound(grok.View):
>> # or grok.context(zope.interface.common.interfaces.IException)
>> At least the equivalent registrations above are the way to implement
>> error views in Zope, according to the exception hook in the
>> for 2.11. Didn't check how it is implemented in pure Zope3
> This way is correct. It was actually borrowed from Zope 3 where it
> appeared first.
>> Perhaps Grok could grow a grok.ErrorView base class that would
>> set the grok.name("index.html")
> Or we define the default view name for exceptions to be 'index'?
> http://worldcookery.com -- Professional Zope documentation and
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev