Method: AwsEc2::Create::ErrorMessages#handle_ec2_service_error!

Defined in:
lib/aws_ec2/create/error_messages.rb

#handle_ec2_service_error!(exception) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/aws_ec2/create/error_messages.rb', line 5

def handle_ec2_service_error!(exception)
  meth = map_exception_to_method(exception)
  if respond_to?(meth)
    message = send(meth) # custom specific error message
    message = print_error_message(exception, message)
  else
    # generic error message
    print_error_message(exception, <<-EOL)
There was an error with the parameters used for the run_instance method.
EOL
  end
end