Class: SimpleDeploy::AWS::CloudFormation::Error
- Inherits:
-
Object
- Object
- SimpleDeploy::AWS::CloudFormation::Error
- Defined in:
- lib/simple_deploy/aws/cloud_formation/error.rb
Instance Method Summary collapse
-
#initialize(args) ⇒ Error
constructor
A new instance of Error.
- #process ⇒ Object
Constructor Details
#initialize(args) ⇒ Error
Returns a new instance of Error.
8 9 10 11 |
# File 'lib/simple_deploy/aws/cloud_formation/error.rb', line 8 def initialize(args) @logger = SimpleDeploy.logger @exception = args[:exception] end |
Instance Method Details
#process ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/simple_deploy/aws/cloud_formation/error.rb', line 13 def process = XmlSimple.xml_in @exception.response.body ['Error'].first['Message'].each do |msg| case msg when 'No updates are to be performed.' @logger.info msg when /^Stack:(.*) does not exist$/ @logger.error msg raise Exceptions::UnknownStack.new msg else @logger.error msg raise Exceptions::CloudFormationError.new msg end end end |