summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJay Mundrawala <jdmundrawala@gmail.com>2014-12-16 22:19:41 -0800
committerBryan McLellan <btm@loftninjas.org>2014-12-17 20:16:14 -0500
commit69d5bb494a14f58b3590027da509eca9ac610c3b (patch)
tree581814d17f1ed4f106cefdfb4a7ed350e967b397
parentff61089480e886e7b730b47ddd1771102285a842 (diff)
downloadchef-69d5bb494a14f58b3590027da509eca9ac610c3b.tar.gz
Rename Chef::Exceptions::LCMParserException to Chef::Exceptions::LCMParser
-rw-r--r--lib/chef/exceptions.rb2
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb2
-rw-r--r--lib/chef/util/dsc/local_configuration_manager.rb2
-rw-r--r--spec/unit/util/dsc/lcm_output_parser_spec.rb4
4 files changed, 5 insertions, 5 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb
index 48ab821cab..0868341849 100644
--- a/lib/chef/exceptions.rb
+++ b/lib/chef/exceptions.rb
@@ -124,7 +124,7 @@ class Chef
class DuplicateDataBagItem < RuntimeError; end
class PowershellCmdletException < RuntimeError; end
- class LCMParserException < RuntimeError; end
+ class LCMParser < RuntimeError; end
class CannotDetermineHomebrewOwner < Package; end
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index 37908d064b..754fde3e8b 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -99,7 +99,7 @@ class Chef
if resources.length > 0
build_resource_info(resources)
else
- raise Chef::Exceptions::LCMParserException, "Could not parse:\n#{lcm_output}"
+ raise Chef::Exceptions::LCMParser, "Could not parse:\n#{lcm_output}"
end
end
diff --git a/lib/chef/util/dsc/local_configuration_manager.rb b/lib/chef/util/dsc/local_configuration_manager.rb
index 55ffc7943c..c3149429f9 100644
--- a/lib/chef/util/dsc/local_configuration_manager.rb
+++ b/lib/chef/util/dsc/local_configuration_manager.rb
@@ -103,7 +103,7 @@ EOH
Chef::Log.debug("DSC: DSC returned the following '-whatif' output from test operation:\n#{what_if_output}")
begin
Parser::parse(what_if_output)
- rescue Chef::Exceptions::LCMParserException => e
+ rescue Chef::Exceptions::LCMParser => e
Chef::Log::warn("Could not parse LCM output: #{e}")
[Chef::Util::DSC::ResourceInfo.new('Unknown DSC Resources', true, ['Unknown changes because LCM output was not parsable.'])]
end
diff --git a/spec/unit/util/dsc/lcm_output_parser_spec.rb b/spec/unit/util/dsc/lcm_output_parser_spec.rb
index 426102caca..347fddf03e 100644
--- a/spec/unit/util/dsc/lcm_output_parser_spec.rb
+++ b/spec/unit/util/dsc/lcm_output_parser_spec.rb
@@ -24,11 +24,11 @@ describe Chef::Util::DSC::LocalConfigurationManager::Parser do
str = <<-EOF
EOF
- expect {Chef::Util::DSC::LocalConfigurationManager::Parser::parse(str)}.to raise_error(Chef::Exceptions::LCMParserException)
+ expect {Chef::Util::DSC::LocalConfigurationManager::Parser::parse(str)}.to raise_error(Chef::Exceptions::LCMParser)
end
it 'raises an exception for a nil input' do
- expect {Chef::Util::DSC::LocalConfigurationManager::Parser::parse(nil)}.to raise_error(Chef::Exceptions::LCMParserException)
+ expect {Chef::Util::DSC::LocalConfigurationManager::Parser::parse(nil)}.to raise_error(Chef::Exceptions::LCMParser)
end
end