Exception: UuAppstudio::Error
- Inherits:
-
StandardError
- Object
- StandardError
- UuAppstudio::Error
- Defined in:
- app/helpers/error.rb
Instance Attribute Summary collapse
-
#cause ⇒ Object
readonly
Returns the value of attribute cause.
-
#error_code ⇒ Object
readonly
Returns the value of attribute error_code.
Instance Method Summary collapse
-
#initialize(error_code, message, cause = nil) ⇒ Error
constructor
A new instance of Error.
- #to_json ⇒ Object
Constructor Details
#initialize(error_code, message, cause = nil) ⇒ Error
Returns a new instance of Error
7 8 9 10 11 |
# File 'app/helpers/error.rb', line 7 def initialize( error_code, , cause=nil ) super( ) @error_code = error_code @cause = cause end |
Instance Attribute Details
#cause ⇒ Object (readonly)
Returns the value of attribute cause
6 7 8 |
# File 'app/helpers/error.rb', line 6 def cause @cause end |
#error_code ⇒ Object (readonly)
Returns the value of attribute error_code
6 7 8 |
# File 'app/helpers/error.rb', line 6 def error_code @error_code end |
Instance Method Details
#to_json ⇒ Object
13 14 15 |
# File 'app/helpers/error.rb', line 13 def to_json(*) {message: , code: @error_code}.to_json end |