Exception: Start::StartError
- Inherits:
-
StandardError
- Object
- StandardError
- Start::StartError
- Defined in:
- lib/start/errors/start_error.rb
Direct Known Subclasses
AuthenticationError, BankingError, ProcessingError, RequestError
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#extras ⇒ Object
readonly
Returns the value of attribute extras.
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
-
#initialize(message = nil, code = nil, http_status = nil, extras = {}) ⇒ StartError
constructor
A new instance of StartError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, code = nil, http_status = nil, extras = {}) ⇒ StartError
Returns a new instance of StartError.
5 6 7 8 9 10 |
# File 'lib/start/errors/start_error.rb', line 5 def initialize( = nil, code = nil, http_status = nil, extras = {}) @message = @code = code @http_status = http_status @extras = extras end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/start/errors/start_error.rb', line 3 def code @code end |
#extras ⇒ Object (readonly)
Returns the value of attribute extras.
3 4 5 |
# File 'lib/start/errors/start_error.rb', line 3 def extras @extras end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
3 4 5 |
# File 'lib/start/errors/start_error.rb', line 3 def http_status @http_status end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/start/errors/start_error.rb', line 3 def @message end |
Instance Method Details
#to_s ⇒ Object
12 13 14 15 |
# File 'lib/start/errors/start_error.rb', line 12 def to_s status_string = @http_status.nil? ? "" : "(#{@code}Error - Status #{@http_status}) " "#{status_string}#{@message}" end |