Exception: Azure::Armrest::ApiException
- Defined in:
- lib/azure/armrest/exception.rb
Direct Known Subclasses
BadGatewayException, BadRequestException, BandwidthLimitExceededException, BlockedByWindowsParentalControlsException, ConflictException, ExpectationFailedException, FailedDependencyException, ForbiddenException, GatewayTimeoutException, GoneException, HTTPVersionNotSupportedException, ImATeapotException, InsufficientStorageException, InternalServerErrorException, LengthRequiredException, LockedException, LoopDetectedException, MethodNotAllowedException, NetworkAuthenticationRequiredException, NotAcceptableException, NotExtendedException, NotFoundException, NotImplementedException, PayloadTooLargeException, PaymentRequiredException, PreconditionFailedException, PreconditionRequiredException, ProxyAuthenticationRequiredException, RangeNotSatisfiableException, RequestHeaderFieldsTooLargeException, RequestTimeoutException, ResourceNotFoundException, RetryWithException, ServiceUnavailableException, TooManyConnectionsFromThisIPException, TooManyRequestsException, URITooLongException, UnauthorizedException, UnorderedCollectionException, UnprocessableEntityException, UnsupportedMediaTypeException, UpgradeRequiredException, VariantAlsoNegotiatesException
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
Attributes inherited from Exception
Instance Method Summary collapse
-
#initialize(code, message, cause_exception) ⇒ ApiException
constructor
Create a new ApiException class.
-
#to_s ⇒ Object
A stringified version of the error.
Constructor Details
#initialize(code, message, cause_exception) ⇒ ApiException
Create a new ApiException class. The code
is the error code.
This class serves as the parent
42 43 44 45 |
# File 'lib/azure/armrest/exception.rb', line 42 def initialize(code, , cause_exception) @code = code super(, cause_exception) end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
37 38 39 |
# File 'lib/azure/armrest/exception.rb', line 37 def code @code end |
Instance Method Details
#to_s ⇒ Object
A stringified version of the error. If self is a plain ApiException, then the cause is included to aid in debugging.
50 51 52 |
# File 'lib/azure/armrest/exception.rb', line 50 def to_s "[#{code}] #{super}" end |