From c05f0def1b5fe4863a80bdfbac3407b011053a89 Mon Sep 17 00:00:00 2001 From: elijah Date: Fri, 31 Oct 2014 16:56:46 -0700 Subject: only spit out stack trace if --debug --- lib/leap_cli/config/object.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/leap_cli/config/object.rb') diff --git a/lib/leap_cli/config/object.rb b/lib/leap_cli/config/object.rb index 45144bc..a0d402b 100644 --- a/lib/leap_cli/config/object.rb +++ b/lib/leap_cli/config/object.rb @@ -293,14 +293,14 @@ module LeapCli Util::log "offending string: #{value}", :indent => 1 Util::log "error message: no file '#{exc}'", :indent => 1 end - raise exc if LeapCli.log_level >= 2 + raise exc if DEBUG end rescue AssertionFailed => exc Util.bail! do Util::log :failed, "assertion while evaluating node '#{self.name}'" Util::log 'assertion: %s' % exc.assertion, :indent => 1 Util::log "offending key: #{key}", :indent => 1 - raise exc if LeapCli.log_level >= 2 + raise exc if DEBUG end rescue SyntaxError, StandardError => exc Util::bail! do @@ -308,7 +308,7 @@ module LeapCli Util::log "offending key: #{key}", :indent => 1 Util::log "offending string: #{value}", :indent => 1 Util::log "error message: #{exc.inspect}", :indent => 1 - raise exc if LeapCli.log_level >= 2 + raise exc if DEBUG end end -- cgit v1.2.3