Hi all,
I've been struggling with some error handling issues for several
days now. Perhaps the key to my problems can be found in the answer
to the question, can errors propagate beyond a pipeline call?
E.g. if I have the following pipeline:
<!-- role-specific index to the contents of the named system. -->
<map:match pattern="*/*/index"> <!-- {1} is systemName, {2} is role -->
<map:generate src="cocoon:/protected/{1}/{2}/index.xsp" label="raw" />
<map:transform src="format/index-page.xsl" />
<map:serialize type="html" />
</map:match>
It does a recursive call to another (internal) pipeline, protected/...
That pipeline, in the same sitemap, looks like this:
<!-- authorize access to protected xsp pages. -->
<map:match pattern="protected/*/*/**.xsp"> <!-- {1} is systemName, {2} is role,
{3} is xsp
file name -->
<map:act type="xsp-action" src="cocoon:/authorize/{1}/{2}">
<map:generate src="systems/{../1}/{../2}/{../3}.xsp" type="serverpages" />
</map:act>
<map:serialize />
</map:match>
Which recursively calls a third pipeline (which generates an XSP page
which is run by the second pipeline).
Naturally the "protected" pipeline (the second one) is used by several
different user-accessible pipelines (like the first one above) to access
various XSP files, subject to authorization. If the authorization fails,
I want the xsp-action running "authorize" to generate an error that jumps
out of the *outer* pipeline
and is caught by an error handler at the outer level, which can output
an "Access denied" message formatted in HTML.
Is this possible?
I have tried doing it several different ways, and so far all have failed.
I could write pages on what I have tried and what the results were, but I'd
just like to know if I'm totally barking up the wrong tree.
I will say that I started with a sitemap-global error handler (outside all
pipelines), then I decided it was better to have the error handler inside
the non-internal pipeline. (That way, the error occurring in the internal
pipeline hopefully would not be caught until it reached the outer pipeline.)
Thanks,
Lars
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]