Exception: Error::CustomError
- Inherits:
-
StandardError
- Object
- StandardError
- Error::CustomError
- Defined in:
- lib/error/custom_error.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status = :bad_request, message = nil, details: nil) ⇒ CustomError
constructor
A new instance of CustomError.
Constructor Details
#initialize(status = :bad_request, message = nil, details: nil) ⇒ CustomError
Returns a new instance of CustomError.
5 6 7 8 9 |
# File 'lib/error/custom_error.rb', line 5 def initialize(status = :bad_request, = nil, details: nil) @status = status @details = details super( || "Something went wrong") end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
3 4 5 |
# File 'lib/error/custom_error.rb', line 3 def details @details end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
3 4 5 |
# File 'lib/error/custom_error.rb', line 3 def status @status end |