lib/AWS/exceptions.rb in grempe-amazon-ec2-0.5.1 vs lib/AWS/exceptions.rb in grempe-amazon-ec2-0.5.2

- old
+ new

@@ -1,166 +1,122 @@ #-- -# Amazon Web Services EC2 Query API Ruby library -# -# Ruby Gem Name:: amazon-ec2 -# Author:: Glenn Rempe (mailto:glenn@rempe.us) -# Copyright:: Copyright (c) 2007-2008 Glenn Rempe -# License:: Distributes under the same terms as Ruby -# Home:: http://github.com/grempe/amazon-ec2/tree/master +# AWS EC2 CLIENT ERROR CODES +# AWS EC2 can throw error exceptions that contain a '.' in them. +# since we can't name an exception class with that '.' I compressed +# each class name into the non-dot version. This allows us to retain +# the granularity of the exception. #++ module AWS - # OUR CUSTOM ERROR CODES - # All of our errors are superclassed by Error < RuntimeError - class Error < RuntimeError #:nodoc: - end + # All AWS errors are superclassed by Error < RuntimeError + class Error < RuntimeError; end - # A client side only argument error - class ArgumentError < Error #:nodoc: - end + # CLIENT : A client side argument error + class ArgumentError < Error; end + # EC2 : User not authorized. + class AuthFailure < Error; end - # AWS EC2 CLIENT ERROR CODES + # EC2 : Invalid AWS Account + class InvalidClientTokenId < Error; end - # AWS EC2 can throw error exceptions that contain a '.' in them. - # since we can't name an exception class with that '.' I compressed - # each class name into the non-dot version. This allows us to retain - # the granularity of the exception. + # EC2 : Invalid Parameters for Value + class InvalidParameterValue < Error; end - # User not authorized. - class AuthFailure < Error #:nodoc: - end + # EC2 : Specified AMI has an unparsable manifest. + class InvalidManifest < Error; end - # Invalid AWS Account - class InvalidClientTokenId < Error #:nodoc: - end + # EC2 : Specified AMI ID is not valid. + class InvalidAMIIDMalformed < Error; end - # Invalid Parameters for Value - class InvalidParameterValue < Error #:nodoc: - end + # EC2 : Specified AMI ID does not exist. + class InvalidAMIIDNotFound < Error; end - # Specified AMI has an unparsable manifest. - class InvalidManifest < Error #:nodoc: - end + # EC2 : Specified AMI ID has been deregistered and is no longer available. + class InvalidAMIIDUnavailable < Error; end - # Specified AMI ID is not valid. - class InvalidAMIIDMalformed < Error #:nodoc: - end + # EC2 : Specified instance ID is not valid. + class InvalidInstanceIDMalformed < Error; end - # Specified AMI ID does not exist. - class InvalidAMIIDNotFound < Error #:nodoc: - end + # EC2 : Specified instance ID does not exist. + class InvalidInstanceIDNotFound < Error; end - # Specified AMI ID has been deregistered and is no longer available. - class InvalidAMIIDUnavailable < Error #:nodoc: - end + # EC2 : Specified keypair name does not exist. + class InvalidKeyPairNotFound < Error; end - # Specified instance ID is not valid. - class InvalidInstanceIDMalformed < Error #:nodoc: - end + # EC2 : Attempt to create a duplicate keypair. + class InvalidKeyPairDuplicate < Error; end - # Specified instance ID does not exist. - class InvalidInstanceIDNotFound < Error #:nodoc: - end + # EC2 : Specified group name does not exist. + class InvalidGroupNotFound < Error; end - # Specified keypair name does not exist. - class InvalidKeyPairNotFound < Error #:nodoc: - end + # EC2 : Attempt to create a duplicate group. + class InvalidGroupDuplicate < Error; end - # Attempt to create a duplicate keypair. - class InvalidKeyPairDuplicate < Error #:nodoc: - end + # EC2 : Specified group can not be deleted because it is in use. + class InvalidGroupInUse < Error; end - # Specified group name does not exist. - class InvalidGroupNotFound < Error #:nodoc: - end + # EC2 : Specified group name is a reserved name. + class InvalidGroupReserved < Error; end - # Attempt to create a duplicate group. - class InvalidGroupDuplicate < Error #:nodoc: - end + # EC2 : Attempt to authorize a permission that has already been authorized. + class InvalidPermissionDuplicate < Error; end - # Specified group can not be deleted because it is in use. - class InvalidGroupInUse < Error #:nodoc: - end + # EC2 : Specified permission is invalid. + class InvalidPermissionMalformed < Error; end - # Specified group name is a reserved name. - class InvalidGroupReserved < Error #:nodoc: - end + # EC2 : Specified reservation ID is invalid. + class InvalidReservationIDMalformed < Error; end - # Attempt to authorize a permission that has already been authorized. - class InvalidPermissionDuplicate < Error #:nodoc: - end + # EC2 : Specified reservation ID does not exist. + class InvalidReservationIDNotFound < Error; end - # Specified permission is invalid. - class InvalidPermissionMalformed < Error #:nodoc: - end + # EC2 : User has reached max allowed concurrent running instances. + class InstanceLimitExceeded < Error; end - # Specified reservation ID is invalid. - class InvalidReservationIDMalformed < Error #:nodoc: - end + # EC2 : An invalid set of parameters were passed as arguments + class InvalidParameterCombination < Error; end - # Specified reservation ID does not exist. - class InvalidReservationIDNotFound < Error #:nodoc: - end + # EC2 : An unknown parameter was passed as an argument + class UnknownParameter < Error; end - # User has reached max allowed concurrent running instances. - class InstanceLimitExceeded < Error #:nodoc: - end - - # An invalid set of parameters were passed as arguments - # e.g. RunInstances was called with minCount and maxCount set to 0 or minCount > maxCount. - class InvalidParameterCombination < Error #:nodoc: - end - - # An unknown parameter was passed as an argument - class UnknownParameter < Error #:nodoc: - end - - # The user ID is neither in the form of an AWS account ID or one + # EC2 : The user ID is neither in the form of an AWS account ID or one # of the special values accepted by the owner or executableBy flags # in the DescribeImages call. - class InvalidUserIDMalformed < Error #:nodoc: - end + class InvalidUserIDMalformed < Error; end - # The value of an item added to, or removed from, an image attribute is invalid. - class InvalidAMIAttributeItemValue < Error #:nodoc: - end + # EC2 : The value of an item added to, or removed from, an image attribute is invalid. + class InvalidAMIAttributeItemValue < Error; end - # ELB ERRORS + # ELB : The Load balancer specified was not found. + class LoadBalancerNotFound < Error; end - class LoadBalancerNotFound < Error #:nodoc: - end + # ELB : + class ValidationError < Error; end - class ValidationError < Error #:nodoc: - end + # ELB : + class DuplicateLoadBalancerName < Error; end - class DuplicateLoadBalancerName < Error #:nodoc: - end + # ELB : + class TooManyLoadBalancers < Error; end - class TooManyLoadBalancers < Error #:nodoc: - end + # ELB : + class InvalidInstance < Error; end - class InvalidInstance < Error #:nodoc: - end + # ELB : + class InvalidConfigurationRequest < Error; end - class InvalidConfigurationRequest < Error #:nodoc: - end + # Server : Internal AWS EC2 Error. + class InternalError < Error; end - # AWS EC2 SERVER ERROR CODES + # Server : There are not enough available instances to satisfy your minimum request. + class InsufficientInstanceCapacity < Error; end - # Internal AWS EC2 Error. - class InternalError < Error #:nodoc: - end + # Server : The server is overloaded and cannot handle the request. + class Unavailable < Error; end - # There are not enough available instances to satify your minimum request. - class InsufficientInstanceCapacity < Error #:nodoc: - end + # Server : The provided signature does not match. + class SignatureDoesNotMatch < Error; end - # The server is overloaded and cannot handle request. - class Unavailable < Error #:nodoc: - end - - class SignatureDoesNotMatch < Error #:nodoc: - end - end +