ZJE
2012-Jul-31 22:24 UTC
[Puppet Users] Get extra error output when debugging custom types?
Is it possible to get extra output when running custom types? Right now, I''m getting an error message and I''m not sure where in the code it''s being thrown from. For example, I can see that I''m trying to iterate over a null object, but I''m not sure where in the code this happening when the message is this: --- Error: /Stage[main]//Node[testnode0101]/TestType[testname]: Could not evaluate: undefined method `each'' for nil:NilClass --- Thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/xV6maUmMVagJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Stefan Schulte
2012-Jul-31 23:07 UTC
Re: [Puppet Users] Get extra error output when debugging custom types?
On Tue, Jul 31, 2012 at 03:24:15PM -0700, ZJE wrote:> Is it possible to get extra output when running custom types? Right now, > I''m getting an error message and I''m not sure where in the code it''s being > thrown from. > For example, I can see that I''m trying to iterate over a null object, but > I''m not sure where in the code this happening when the message is this: > --- > Error: /Stage[main]//Node[testnode0101]/TestType[testname]: Could not > evaluate: undefined method `each'' for nil:NilClass > --- >Try to run puppet with the --trace option which will hopefully show a stacktrace when the error is happening. Otherwise you can place a few method call like debug "inside validation block" etc and run puppet with -d/--debug -Stefan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
ZJE
2012-Aug-01 12:47 UTC
Re: [Puppet Users] Get extra error output when debugging custom types?
On Tuesday, July 31, 2012 6:07:40 PM UTC-5, Stefan Schulte wrote:> > On Tue, Jul 31, 2012 at 03:24:15PM -0700, ZJE wrote: > > Is it possible to get extra output when running custom types? Right now, > > I''m getting an error message and I''m not sure where in the code it''s > being > > thrown from. > > For example, I can see that I''m trying to iterate over a null object, > but > > I''m not sure where in the code this happening when the message is this: > > --- > > Error: /Stage[main]//Node[testnode0101]/TestType[testname]: Could not > > evaluate: undefined method `each'' for nil:NilClass > > --- > > > > Try to run puppet with the --trace option which will hopefully show a > stacktrace when the error is happening. Otherwise you can place a few > method call like > > debug "inside validation block" > > etc and run puppet with -d/--debug > > -Stefan > >--trace gives exactly what I was looking for - thanks! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/4SMLcNuTFWcJ. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.