lib/chef-dk/exceptions.rb in chef-dk-4.0.60 vs lib/chef-dk/exceptions.rb in chef-dk-4.1.7
- old
+ new
@@ -1,7 +1,7 @@
#
-# Copyright:: Copyright (c) 2014-2018 Chef Software Inc.
+# Copyright:: Copyright (c) 2014-2019 Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@@ -49,12 +49,14 @@
super("Component #{component_name} is missing.\nReason: #{reason}")
end
end
class OmnibusInstallNotFound < RuntimeError
+ require_relative "dist"
+
def initialize
- super("Can not find omnibus installation directory for Chef.")
+ super("Can not find omnibus installation directory for #{ChefDK::Dist::PRODUCT}.")
end
end
class UnsupportedFeature < StandardError
end
@@ -64,10 +66,10 @@
class InvalidPolicyfileSourceURI < StandardError
def initialize(url, reason = nil)
@url = url
@reason = reason
- msg = "'#{@url}' is not a valid Policy File Source URI"
+ msg = "'#{@url}' is not a valid Policyfile Source URI"
msg << " #{@reason}." unless @reason.nil?
super(msg)
end
end