GrpcStatus

Available in a dev version: 0․11․0-grpc-186

How to configure

expect class GrpcStatus(source)

Defines the status of an operation by providing a standard GrpcStatusCode in conjunction with an optional descriptive message.

For clients, every remote call will return a status on completion. In the case of errors this status may be propagated to blocking stubs as a RuntimeException or to a listener as an explicit parameter.

Similarly, servers can report a status by throwing GrpcStatusException or by passing the status to a callback.

Utility functions are provided to convert a status to an exception and to extract them back out.

Extended descriptions, including a list of codes that shouldn't be generated by the library, can be found at doc/statuscodes.md

actual typealias GrpcStatus = Status(source)

Defines the status of an operation by providing a standard GrpcStatusCode in conjunction with an optional descriptive message.

For clients, every remote call will return a status on completion. In the case of errors this status may be propagated to blocking stubs as a RuntimeException or to a listener as an explicit parameter.

Similarly, servers can report a status by throwing GrpcStatusException or by passing the status to a callback.

Utility functions are provided to convert a status to an exception and to extract them back out.

Extended descriptions, including a list of codes that shouldn't be generated by the library, can be found at doc/statuscodes.md

actual class GrpcStatus(source)

Defines the status of an operation by providing a standard GrpcStatusCode in conjunction with an optional descriptive message.

For clients, every remote call will return a status on completion. In the case of errors this status may be propagated to blocking stubs as a RuntimeException or to a listener as an explicit parameter.

Similarly, servers can report a status by throwing GrpcStatusException or by passing the status to a callback.

Utility functions are provided to convert a status to an exception and to extract them back out.

Extended descriptions, including a list of codes that shouldn't be generated by the library, can be found at doc/statuscodes.md

Properties

Link copied to clipboard

The description of this status, or null if not present.

Link copied to clipboard

The status code of this status.

The status code of this status.

The status code of this status.

Functions

Link copied to clipboard

Converts this status to a GrpcStatusException with optional trailers.

Link copied to clipboard
actual fun getCause(): Throwable?
Link copied to clipboard
actual fun getDescription(): String?
Link copied to clipboard
open override fun toString(): String