When create_resources() function causes puppet logic to be evaluated, certain errors are not displayed with the puppet context (file/line) that they appear in.
This can be observed with this simple sample:
The result on Puppet 3.7.4 (with current parser) is:
The result with Puppet 3.7.4 (with future parser) and puppet 4.0.0 is:
Thus, the problem is at least fixed in newer versions.
In PE 2.8 (Puppet 2.7.x) this function will show the file/line number detail of the Puppet DSL code where the exception occurred.
In PE 3.x(including PE 3.7 / Puppet 3.7) it shows the file/line number of the Puppet DSL where the create_resources() function was invoked - which is not helpful.