Exception: GrpcKit::Errors::BadStatus

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, reason) ⇒ BadStatus


25
26
27
28
29
# File 'lib/grpc_kit/errors.rb', line 25

def initialize(code, reason)
  @code = code
  @reason = reason
  super("[#{GrpcKit::StatusCodes::CODE_NAME[code]}] #{reason}")
end

Instance Attribute Details

#codeString (readonly)


18
19
20
# File 'lib/grpc_kit/errors.rb', line 18

def code
  @code
end

#reasonString (readonly)


21
22
23
# File 'lib/grpc_kit/errors.rb', line 21

def reason
  @reason
end