Exception: BERTRPC::BERTRPCError
- Inherits:
-
StandardError
- Object
- StandardError
- BERTRPC::BERTRPCError
- Defined in:
- lib/bertrpc/errors.rb
Direct Known Subclasses
ConnectionError, InvalidOption, ProtocolError, ProxyError, ReadError, ReadTimeoutError, ServerError, UserError
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#original_exception ⇒ Object
Returns the value of attribute original_exception.
Instance Method Summary collapse
-
#initialize(msg = nil, klass = nil, bt = []) ⇒ BERTRPCError
constructor
A new instance of BERTRPCError.
Constructor Details
#initialize(msg = nil, klass = nil, bt = []) ⇒ BERTRPCError
Returns a new instance of BERTRPCError.
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/bertrpc/errors.rb', line 5 def initialize(msg = nil, klass = nil, bt = []) case msg when Array code, = msg else code, = [0, msg] end if klass self.original_exception = RemoteError.new("#{klass}: #{}") self.original_exception.set_backtrace(bt) else self.original_exception = self end self.code = code super() end |
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
3 4 5 |
# File 'lib/bertrpc/errors.rb', line 3 def code @code end |
#original_exception ⇒ Object
Returns the value of attribute original_exception.
3 4 5 |
# File 'lib/bertrpc/errors.rb', line 3 def original_exception @original_exception end |