diff options
Diffstat (limited to 'lib/chef/log.rb')
-rw-r--r-- | lib/chef/log.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/chef/log.rb b/lib/chef/log.rb index 9b27778a40..2cf08324c8 100644 --- a/lib/chef/log.rb +++ b/lib/chef/log.rb @@ -37,7 +37,8 @@ class Chef end end - def self.deprecation(msg=nil, &block) + def self.deprecation(msg=nil, location=caller(2..2)[0], &block) + msg = Array(msg) + [ location ] if location if Chef::Config[:treat_deprecation_warnings_as_errors] error(msg, &block) raise Chef::Exceptions::DeprecatedFeatureError.new(msg) |