cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Demystification of pipelineComponent trouble
Date Wed, 19 Sep 2007 23:20:46 GMT
Joerg Heinicke wrote:
> On 19.09.2007 18:22 Uhr, Grzegorz Kossakowski wrote:
> 
>> As you see, this pipeline just process simple JX template that tries 
>> to access one variable
>> (status.myTasks) and fails at this point. It must fail (by throwing 
>> NPE) because there is no
>> status.myTasks variable in OM! It's the flowscript code from myBlock1 
>> that is responsible for
>> setting it and that's why the only valid way to test my sample:
> 
> Whether there is a variable set or not, a NPE is never good sign. 
> Shouldn't this case be handled? Spring for example throws a 
> NullValueInPathException instead.

No. No to exception :)

I suspect in this particular case (CTemplate) no exception should be thrown at 
all: as far as I understand, Cocoon 2.1 will just return empty (or null) value, 
but will not throw an exception. Examples:

   ${foo}, ${cocoon.foo}, ${continuation.foo}

all return empty value, no exception.

Vadim

Mime
View raw message