summaryrefslogtreecommitdiff
path: root/lib/chef/exceptions.rb
diff options
context:
space:
mode:
authortyler-ball <tyleraball@gmail.com>2014-11-26 14:12:03 -0800
committertyler-ball <tyleraball@gmail.com>2014-12-17 18:52:21 -0800
commitd454a7214b2738acd9a00e1f29737927a4a4d5d7 (patch)
treee96081d9922af763215d6ab44ac4b54041c45b96 /lib/chef/exceptions.rb
parentb079e015f4ebb8c5db600bd49641699cbbacdb10 (diff)
downloadchef-d454a7214b2738acd9a00e1f29737927a4a4d5d7.tar.gz
Failing an audit example will now raise an error and make chef exit with a non-zero code
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r--lib/chef/exceptions.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index 9fae1d566f..2cf8766585 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -396,6 +396,11 @@ class Chef
super "You must provide a block with audits"
end
end
+ class AuditsFailed < RuntimeError
+ def initialize
+ super "There were audit example failures. Results were still sent to the server."
+ end
+ end
# If a converge or audit fails, we want to wrap the output from those errors into 1 error so we can
# see both issues in the output. It is possible that nil will be provided. You must call `fill_backtrace`