Exception: GrpcKit::Errors::BadStatus
- Inherits:
-
StandardError
- Object
- StandardError
- GrpcKit::Errors::BadStatus
- Defined in:
- lib/grpc_kit/errors.rb
Direct Known Subclasses
Aborted, AlreadyExists, Cancelled, DataLoss, DeadlineExceeded, DoNotUse, FailedPrecondition, Internal, InvalidArgument, NotFound, OutOfRange, PermissionDenied, ResourceExhausted, Unauthenticated, Unavailable, Unimplemented, Unknown
Instance Attribute Summary collapse
- #code ⇒ String readonly
- #reason ⇒ String readonly
Instance Method Summary collapse
-
#initialize(code, reason) ⇒ BadStatus
constructor
A new instance of BadStatus.
Constructor Details
#initialize(code, reason) ⇒ BadStatus
Returns a new instance of BadStatus.
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
#code ⇒ String (readonly)
27 28 29 |
# File 'lib/grpc_kit/errors.rb', line 27 def code @code end |
#reason ⇒ String (readonly)
30 31 32 |
# File 'lib/grpc_kit/errors.rb', line 30 def reason @reason end |