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.
-
#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) ⇒ StartError
constructor
A new instance of StartError.
- #to_s ⇒ Object
Constructor Details
#initialize(message = nil, code = nil, http_status = nil) ⇒ StartError
Returns a new instance of StartError.
7 8 9 10 11 |
# File 'lib/start/errors/start_error.rb', line 7 def initialize(=nil, code=nil, http_status=nil) = @code = code @http_status = http_status end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
4 5 6 |
# File 'lib/start/errors/start_error.rb', line 4 def code @code end |
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
5 6 7 |
# File 'lib/start/errors/start_error.rb', line 5 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 end |
Instance Method Details
#to_s ⇒ Object
13 14 15 16 |
# File 'lib/start/errors/start_error.rb', line 13 def to_s status_string = @http_status.nil? ? "" : "(#{@code}Error - Status #{@http_status}) " "#{status_string}#{@message}" end |