On Mon, 16 May 2011 10:34:45 -0700, Matt Robinson wrote:
> 
> Contrary to the current code and ticket #7314 I think syntax errors in
> Faces should raise errors immediately instead of just warning in the
> log.  I could be convinced otherwise, but the discussion with the
> original coder of the current behavior and the aforementioned ticket
> haven't done so.  Generally I think code should fail early so that
> it's easier to debug and fix, rather than continue and then end up
> giving you problems that aren't nearly as clear.
> 
> While trying to debug some Faces to work in Ruby 1.9.2 I found that
> syntax errors in the face aren't raised, the face just fails to load
> and you get:
> 
>      lib/puppet/interface.rb:61:in `[]': Could not find Puppet Face
> :certificate (Puppet::Error)
> 
> The real reason you can't find the face was
> 
>     /Users/matthewrobinson/work/puppet/lib/puppet/face/certificate.rb:11:
>    invalid multibyte char (US-ASCII)
> 
> But unless you know to check the logs, it will take some digging to
> figure out why that face wasn't loaded.
> 
> Thoughts?
> 

Syntax errors definitely strike me as something that we should fail
loudly about.

I'm not quite as convinced about "fail hard", though.

Verbosity, and severity of the failure seem like two independent knobs
we can adjust here, and I'm 100% for turning the verbosity knob up to
11.

-- 
Jacob Helwig

Attachment: signature.asc
Description: Digital signature

Reply via email to