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

Returns a new instance of BadStatus.

Parameters:

  • code (String)

    GrpcKit::StatusCodes’s value

  • reason (String)


34
35
36
37
38
# File 'lib/grpc_kit/errors.rb', line 34

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

Instance Attribute Details

#codeString (readonly)

Returns:

  • (String)


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

def code
  @code
end

#reasonString (readonly)

Returns:

  • (String)


30
31
32
# File 'lib/grpc_kit/errors.rb', line 30

def reason
  @reason
end