summaryrefslogtreecommitdiff
path: root/lib/chef/exceptions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/exceptions.rb')
-rw-r--r--lib/chef/exceptions.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index 26d9f612f1..bd6d887884 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -195,7 +195,6 @@ class Chef
end
end
-
end
# Exception class for collecting multiple failures. Used when running
# delayed notifications so that chef can process each delayed
@@ -263,7 +262,7 @@ class Chef
"non_existent_cookbooks" => non_existent_cookbooks,
"cookbooks_with_no_versions" => cookbooks_with_no_matching_versions
}
- result.to_json(*a)
+ Chef::JSONCompat.to_json(result, *a)
end
end
@@ -298,7 +297,7 @@ class Chef
"non_existent_cookbooks" => non_existent_cookbooks,
"most_constrained_cookbooks" => most_constrained_cookbooks
}
- result.to_json(*a)
+ Chef::JSONCompat.to_json(result, *a)
end
end
@@ -339,5 +338,11 @@ class Chef
end
class BadProxyURI < RuntimeError; end
+
+ # Raised by Chef::JSONCompat
+ class JSON
+ class EncodeError < RuntimeError; end
+ class ParseError < RuntimeError; end
+ end
end
end