Exception: ActiveRpc::OperationFailure
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- ActiveRpc::OperationFailure
- Defined in:
- lib/active_rpc/errors.rb
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.
Instance Method Summary collapse
-
#initialize(code:, message: nil, data: nil) ⇒ OperationFailure
constructor
A new instance of OperationFailure.
- #rpc_error ⇒ Object
Constructor Details
#initialize(code:, message: nil, data: nil) ⇒ OperationFailure
Returns a new instance of OperationFailure.
5 6 7 8 9 |
# File 'lib/active_rpc/errors.rb', line 5 def initialize(code:, message: nil, data: nil) @code = code @message = @data = data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
3 4 5 |
# File 'lib/active_rpc/errors.rb', line 3 def code @code end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/active_rpc/errors.rb', line 3 def data @data end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
3 4 5 |
# File 'lib/active_rpc/errors.rb', line 3 def @message end |
Instance Method Details
#rpc_error ⇒ Object
11 12 13 |
# File 'lib/active_rpc/errors.rb', line 11 def rpc_error Errors::OperationFailure.new(code: code, message: , data: data) end |