Exception: OrientdbBinary::ProtocolError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/orientdb_binary/protocols/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(session, *exceptions) ⇒ ProtocolError

Returns a new instance of ProtocolError.



21
22
23
24
25
26
# File 'lib/orientdb_binary/protocols/errors.rb', line 21

def initialize(session, *exceptions)
  @session
  @exception_class = exceptions[0] && exceptions[0][:exception_class]

  super exceptions.map { |exp| [ exp[:exception_class], exp[:exception_message] ].reject { |s| s.nil? }.join(': ') }.join("\n")
end

Instance Attribute Details

#exception_classObject (readonly)

Returns the value of attribute exception_class.



19
20
21
# File 'lib/orientdb_binary/protocols/errors.rb', line 19

def exception_class
  @exception_class
end

#sessionObject (readonly)

Returns the value of attribute session.



19
20
21
# File 'lib/orientdb_binary/protocols/errors.rb', line 19

def session
  @session
end