Exception: ContentGateway::BaseError
- Inherits:
-
StandardError
- Object
- StandardError
- ContentGateway::BaseError
- Defined in:
- lib/content_gateway/exceptions.rb
Direct Known Subclasses
ConflictError, ConnectionFailure, Forbidden, OpenSSLFailure, ParserError, ResourceNotFound, ServerError, TimeoutError, UnauthorizedError, ValidationError
Instance Attribute Summary collapse
-
#info ⇒ Object
readonly
Returns the value of attribute info.
-
#resource_url ⇒ Object
readonly
Returns the value of attribute resource_url.
-
#status_code ⇒ Object
readonly
Returns the value of attribute status_code.
-
#wrapped_exception ⇒ Object
readonly
Returns the value of attribute wrapped_exception.
Instance Method Summary collapse
-
#initialize(resource_url, wrapped_exception = nil, status_code = nil, info = nil) ⇒ BaseError
constructor
A new instance of BaseError.
Constructor Details
#initialize(resource_url, wrapped_exception = nil, status_code = nil, info = nil) ⇒ BaseError
Returns a new instance of BaseError.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/content_gateway/exceptions.rb', line 5 def initialize(resource_url, wrapped_exception = nil, status_code = nil, info = nil) @resource_url = resource_url @wrapped_exception = wrapped_exception @status_code = status_code @info = info = @resource_url.dup if @wrapped_exception << " - #{@wrapped_exception.}" << " - #{@info}" if @info end super() end |
Instance Attribute Details
#info ⇒ Object (readonly)
Returns the value of attribute info.
3 4 5 |
# File 'lib/content_gateway/exceptions.rb', line 3 def info @info end |
#resource_url ⇒ Object (readonly)
Returns the value of attribute resource_url.
3 4 5 |
# File 'lib/content_gateway/exceptions.rb', line 3 def resource_url @resource_url end |
#status_code ⇒ Object (readonly)
Returns the value of attribute status_code.
3 4 5 |
# File 'lib/content_gateway/exceptions.rb', line 3 def status_code @status_code end |
#wrapped_exception ⇒ Object (readonly)
Returns the value of attribute wrapped_exception.
3 4 5 |
# File 'lib/content_gateway/exceptions.rb', line 3 def wrapped_exception @wrapped_exception end |