Exception: Jr::ServerError
Overview
ServerError is raised when the server requests (via the error property) that an exception be raised in client code.
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Attributes inherited from Error
Instance Method Summary collapse
-
#initialize(jr, code, message, data) ⇒ ServerError
constructor
A new instance of ServerError.
Constructor Details
#initialize(jr, code, message, data) ⇒ ServerError
Returns a new instance of ServerError.
65 66 67 68 69 |
# File 'lib/jr.rb', line 65 def initialize(jr, code, , data) @code, @message, @data = code, , data super(jr, "Error %d: %s" % [code, ]) end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
59 60 61 |
# File 'lib/jr.rb', line 59 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
63 64 65 |
# File 'lib/jr.rb', line 63 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
61 62 63 |
# File 'lib/jr.rb', line 61 def @message end |