lib/capistrano/asg/rolling/instance.rb in capistrano-asg-rolling-0.3.0 vs lib/capistrano/asg/rolling/instance.rb in capistrano-asg-rolling-0.4.0

- old
+ new

@@ -89,9 +89,11 @@ def terminate(wait: false) aws_ec2_client.terminate_instances(instance_ids: [id]) aws_ec2_client.wait_until(:instance_terminated, instance_ids: [id]) if wait @terminated = true + rescue Aws::EC2::Errors::ServiceError => e + raise Capistrano::ASG::Rolling::InstanceTerminateFailed.new(self, e) end def create_ami(name: nil, description: nil, tags: nil) ami_tags = { 'Name' => autoscale_group.name_tag,