Exception: Uiza::Error::UizaError
- Inherits:
-
StandardError
- Object
- StandardError
- Uiza::Error::UizaError
- Defined in:
- lib/uiza/error/uiza_error.rb
Direct Known Subclasses
BadRequestError, ClientError, InternalServerError, NotFoundError, ServerError, ServiceUnavailableError, UnauthorizedError, UnprocessableError
Constant Summary collapse
- DEFAULT_CODE =
"".freeze
- DEFAULT_MESSAGE =
"Unknow Error.".freeze
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#description_link ⇒ Object
readonly
Returns the value of attribute description_link.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(description_link, message = nil, code = nil) ⇒ UizaError
constructor
A new instance of UizaError.
Constructor Details
#initialize(description_link, message = nil, code = nil) ⇒ UizaError
Returns a new instance of UizaError.
11 12 13 14 15 |
# File 'lib/uiza/error/uiza_error.rb', line 11 def initialize description_link, = nil, code = nil @description_link = description_link @message = (.to_s.empty? ? nil : ) || self.class::DEFAULT_MESSAGE @code = (code.to_s.empty? ? nil : code.to_i) || self.class::DEFAULT_CODE end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
5 6 7 |
# File 'lib/uiza/error/uiza_error.rb', line 5 def code @code end |
#description_link ⇒ Object (readonly)
Returns the value of attribute description_link.
4 5 6 |
# File 'lib/uiza/error/uiza_error.rb', line 4 def description_link @description_link end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
6 7 8 |
# File 'lib/uiza/error/uiza_error.rb', line 6 def @message end |