Sha256: e05c2c81284310b2b00e0fce2335ad13860c089ca72b47f7d8f94292285c6144

Contents?: true

Size: 929 Bytes

Versions: 19

Compression:

Stored size: 929 Bytes

Contents

module SimpleDeploy
  class AWS
    class CloudFormation
      class Error

        def initialize(args)
          @logger    = SimpleDeploy.logger
          @exception = args[:exception]
        end

        def process
          message = @exception.message
          unless message.empty?
            case message 
            when 'No updates are to be performed.'
              @logger.info message 
            when /^Stack:(.*) does not exist$/
              @logger.error message
              raise Exceptions::UnknownStack.new message
            else
              @logger.error message
              raise Exceptions::CloudFormationError.new message
            end
          else
            @logger.error "Unknown exception from cloudformation #{@exception.inspect}"
            raise Exceptions::CloudFormationError.new "Unknown exception from cloudformation"
          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
simple_deploy-0.10.2 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.10.1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.10.0 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.10.0.beta.3 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.10.0.beta.2 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.10.0.beta.1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.9.2 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.9.1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.9.0 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.8.2 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.8.2.beta1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.8.1.beta1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.8.0 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.8 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.7 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.7.beta.1 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.6 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.6.beta.6 lib/simple_deploy/aws/cloud_formation/error.rb
simple_deploy-0.7.6.beta.5 lib/simple_deploy/aws/cloud_formation/error.rb