Hi Bertrand,
Am 06.07.15 um 11:16 schrieb Bertrand Delacretaz:
Hi Sandro,
On Mon, Jul 6, 2015 at 10:07 AM, Sandro Boehme <sandro.boe...@gmx.de> wrote:
to be more concrete, I've added a Throwable.jsp and a 500.jsp to
"contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor/errorhandler"...
AFAIK those will only apply to resources of type
sling/resource-editor/errorhandler
and
"contrib/explorers/resourceeditor/src/main/resources/SLING-INF/libs/sling/resource-editor"
Those should apply if a Throwable is thrown or sendResult(500) is
called while processing a resource of the sling/resource-editor type.
yes, the resource type is "sling/resource-editor". Thanks for your
infos, it's good to know that this files should apply.
If you want to debug, grepping the DEBUG logs for "candidate" lists
which scripts/servlets are considered, and debugging the
SlingServletResolver.handleError method should help as well.
The processing flow does not seem to go through this method as the
debugger does not stop there.
I debugged from the SlingPostServlet on and saw that
AbstractPostOperation.run() line 144
set the error:
" } catch (Exception e) {
log.error("Exception during response processing.", e);
response.setError(e);
}"
and AbstractPostResponse:prepare() line 296
rendered the error page:
" if (getError() != null) {
setStatus(500, getError().toString());
setTitle("Error while processing " + path);
}"
...
But I don't see something that decides when an error page should be shown.
It looks like there is no simple answer so if there is no quick idea on
what I could try I would have a look at the integration tests for custom
error pages and/or would start from plain vanilla error page examples.
Thanks,
Sandro
-Bertrand