description
RPCError.swift:120var description: String { get }
var description: String { get }
import GRPCCore
A gRPC library for Swift written natively in Swift.
struct RPCError
An error representing the outcome of an RPC.
@frozen struct String
A Unicode string value that is a collection of characters.
init(_ convertible: some RPCErrorConvertible)
Create a new error by converting the given value.
init(code: Code, message: String, metadata: Metadata = [:], cause: RPCError)
Create a new RPC error. If the given cause
shares the same code
, then it will be flattened into a single error, by merging the messages and metadata.
init(code: Code, message: String, metadata: Metadata = [:], cause: (any Error)? = nil)
Create a new RPC error. If the given cause
is also an RPCError
sharing the same code
, then they will be flattened into a single error, by merging the messages and metadata.
init?(status: Status, metadata: Metadata = [:])
Create a new RPC error from the provided Status
.
var cause: (any Error)?
The original error which led to this error being thrown.
var code: Code
A code representing the high-level domain of the error.
var message: String
A message providing additional context about the error.
var metadata: Metadata
Metadata associated with the error.
static func == (lhs: RPCError, rhs: RPCError) -> Bool
func hash(into hasher: inout Hasher)
struct Code