|[Acceleo] Problem by passing null to a template [message #607721]
||Tue, 21 September 2010 16:13
| Simon harrer
Registered: August 2010
I am using acceleo with dynamic template detection. I invoke it this way:|
The generate Template is defined like this:
[template generate(x : TypeA)] .... [/template]
[template generate(x : TypeB)] .... [/template]
in my case, type.attribute can be either there or not, as it is optional. I do have many of such cases in my code.
When this is executed and this is null, then it throws a NullPointerException during the template detection algorithm. Could I configure it that this just fails silently and this precise statement doesn't have an output? If not, I have to provide always the same code for checking if the variable is there and if not, then do not execute this.
An additional problem is, that by having this null pointer exception, the point of the error is almost impossible to find from the error statement as no line is given at which this is invoked. ...
Powered by FUDForum
. Page generated in 0.01625 seconds