zfm via Plone Community wrote at 2022-3-24 08:58 +0000:
Can you clarify where in the Zope code the error view can be customised? or where to adjust standard_error_message.
A view in general is an adapter for a pair object, request.
Usually, a template is associated with a view which "presents"
the adapted object for the request.
You (usually) register views in "ZCML" via "browser:page".
For details, search the net (e.g. in the Plone documentation).
An error view is a view where the object is an exception.
When I remember right,
standard_error_message is no longer
installed in the Zope root object.
If this is the case, you must create an object
with this name (a template or Python script).
If it is still installed, you must modify/replace the object.
Also, in Zope 2, this was the default behavior, I mean, the traceback for a error was returned to the browser. What exactly changed?
Zope 4 no longer does everything itself -- but delegates to
other frameworks. This allows to simplify things and reduces
the maintenance burden.
In particular, Zope 4 is a "WSGI application". This means that
it runs (as application component) in a WSGI server framework which provides
standard solutions for many web application related tasks -
among them error handling.
For most users the default error handling is sufficient.
For users with special requirements (such as you),
there are very flexible ways to customize the error handling
(--> error views and
I am not sure whether the newer (Zope component architecture
related) features (such as views, events, adapters, utilities)
are already documented in the (fairly old) Zope documentation.
But you will surely find related information in the Plone
documentation (--> "https://docs.plone.org/").