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.
6 7 8 9 |
# File 'lib/simple_deploy/aws/cloud_formation/error.rb', line 6 def initialize(args) @logger = SimpleDeploy.logger @exception = args[:exception] end |
Instance Method Details
#process ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/simple_deploy/aws/cloud_formation/error.rb', line 11 def process = @exception. unless .empty? case when 'No updates are to be performed.' @logger.info when /^Stack:(.*) does not exist$/ @logger.error raise Exceptions::UnknownStack.new else @logger.error raise Exceptions::CloudFormationError.new end else @logger.error "Unknown exception from cloudformation #{@exception.inspect}" raise Exceptions::CloudFormationError.new "Unknown exception from cloudformation" end end |