cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject RE: error handling
Date Fri, 04 Jun 2004 07:40:06 GMT
Torsten Curdt wrote:
> 
> >>IIRC, last first friday we had a chat with Carsten about adding an 
> >>attribute to the <handle-errors/> or to the <pipeline/> which will

> >>indicate what behavior is needed in case of internal request: throw 
> >>exception or process <handle-errors/>. Carsten?
> 
> Sounds like a good plan. In fact I think it would be a good 
> default behavior but anyway.
> 
> > Yes, nothing of that is implemented yet. The discussion started 
> > because of internal redirects.
> > Now, in general the error handlers are never called for internal 
> > requests - that was a design decision. Starting with 2.1.5 
> we have one 
> > exception, internal redirects, so if you do a <map:redirect-to 
> > uri="cocoon:/something"/> then - and only then - the error 
> handler of 
> > the internal pipeline is called.
> > 
> > HTH?
> 
> Well, it clarifies... ;) Thanks!
> 
> ...but - I think we definitely need a way to handle errors 
> inside internal pipeline calls! Otherwise there is just no 
> way to handle errors in an aggregation appropriately.
> 
> I am happy to do it ...if there are no objections.
> 
> But where to place it? I reckon we either need to make the 
> interal pipeline calls go through the same hook inside the 
> treeprocessor or move the error handling further down into 
> the pipeline code.
> 
I think we can use the available things.

We discussed two solutions: specifying it at the call, like:

cocoon:handle-error:/something or cocoon:/something?cocoon:handle-error=true

(Note the ':' in the second example which is not allowed for
usual request parameters).

and specifying it in the called pipeline:
<map:pipeline handle-errors-for-internal-calls="true"/>

The names of the attributes/request-parameters I used have not been
set in the discussions. I just used here some to show the principle.

Now, implementing this should be a two or three liner :) I already
had it implemented but lost the code...

Carsten


Mime
View raw message