Torsten Curdt wrote:

...What about...

  <map:pipeline handle-errors="always|external|internal"/>

our current behaviour would be "external".
I would like to have "always" andt the "internal" option might be FS ;)


+1 for the declaration, looks clean enough!


Carsten, I'd really like to takle this ASAP.
We are currently using a *very* ugly work around.


Sorry to jump in late.

This problem and possible discussions where discussed at [1], [2] and follow-ups. The conclusion was that choosing to handle errors or not in internal pipelines could be decided either by the caller or by the callee depending on the use cases.

There's a technical difficulty, however, as internal requests are handled differently than external ones when it comes to handling errors occuring during pipeline execution (not during pipeline building).
- pipelines for external requests are executed as soon as the pipeline is ended, i.e. in the map:serialize statement, hence under control of the treeprocessor
- pipelines for internal requests are executed when getInputStream() or toSAX() is called on the "cocoon:" source, out of the control of the treeprocessor.


So we can add add handle-errors="always|external|internal" and "?cocoon:handle-errors=true", but it will handle errors occuring during the _building_ of the pipeline, and not during its _execution_.

Handling errors occuring during the execution of internal requests would require some not so innocent changes in the pipeline machinery [3].

But we can of course go one step at a time and start by catching pipeline build-time exceptions.

Sylvain

[1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107874417205088&w=2
[2] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107875707604536&w=2
[3] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107876029119774&w=2

--
Sylvain Wallez                                  Anyware Technologies
http://www.apache.org/~sylvain           http://www.anyware-tech.com
{ XML, Java, Cocoon, OpenSource }*{ Training, Consulting, Projects }



Reply via email to