Exception: Tina4Ultipa::Error

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

Overview

A gqldb server or protocol error. Writes and bad statements fail LOUD (raise), never a falsy return - the framework's graph layer relies on this. code is the gRPC status name when known.

Direct Known Subclasses

ConnectError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message, code: nil, cause: nil) ⇒ Error

Returns a new instance of Error.



10
11
12
13
14
# File 'lib/tina4_ultipa/errors.rb', line 10

def initialize(message, code: nil, cause: nil)
  super(message)
  @code = code
  @cause_error = cause
end

Instance Attribute Details

#cause_errorObject (readonly)

The wrapped lower-level exception (gRPC error), when there is one.



17
18
19
# File 'lib/tina4_ultipa/errors.rb', line 17

def cause_error
  @cause_error
end

#codeObject (readonly)

Returns the value of attribute code.



8
9
10
# File 'lib/tina4_ultipa/errors.rb', line 8

def code
  @code
end