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