.NET client exceptions
This page maps Control RPC conditions to exceptions in ViveSound.Sdk.Ctl.
BCL exceptions
The library throws BCL exceptions when a request is terminated locally rather than rejected by the engine.
System.ExceptionSystem.SystemExceptionSystem.ArgumentExceptionSystem.InvalidOperationExceptionSystem.TimeoutExceptionSystem.OperationCanceledException
| C# exception | Description | gRPC status codes |
|---|---|---|
ArgumentException |
Invalid or incomplete client configuration detected locally before any request is sent to engine. | none (client-side condition) |
InvalidOperationException |
Operation interrupted because the client was closed. | none (client-side condition) |
TimeoutException |
Request aborted by a client-side timeout. | CANCELLED (client-side condition) |
OperationCanceledException |
Request canceled via caller context. | CANCELLED (client-side condition) |
Engine exceptions
Engine-side failures use EngineException as a base class. Derived classes represent exception categories, and each category carries an enum that identifies the specific error condition.
System.Exception
| C# class | Class description | C# error code | Code description | gRPC status codes |
|---|---|---|---|---|
EngineConnectionException |
Engine cannot be reached: no engine discovered, connection not established, or existing connection/session lost. | EngineConnectionError.NotDiscovered |
Engine not discovered during client initialization. | none (client-side condition) |
EngineConnectionError.Unavailable |
Engine unavailable: connect failed, connection/session lost, engine stopped/restarted. | UNAVAILABLE |
||
EngineCompatibilityException |
Client and engine versions/protocol are not compatible. | EngineCompatibilityError.VersionMismatch |
Engine version is incompatible with the client. | UNIMPLEMENTED |
EngineCompatibilityError.UnexpectedResponse |
Successful response is semantically invalid or incomplete. | none (client-side condition) | ||
EngineRuntimeException |
Engine failed while handling request (not rejecting it). | EngineRuntimeError.EngineFault |
Temporary engine failure, or unmapped engine status. | ABORTED, INTERNAL, any unmapped engine status |
EngineRequestException |
Request reached engine and was rejected by it. | EngineRequestError.InvalidRequest |
Request is ill-formed or has invalid arguments. | INVALID_ARGUMENT |
EngineRequestError.ResourceNotFound |
Requested identifier was not found. | NOT_FOUND |
||
EngineRequestError.ResourceAlreadyExists |
Requested identifier already exists. | ALREADY_EXISTS |
||
EngineRequestError.ResourceExhausted |
Operation rejected because a resource limit was reached. | RESOURCE_EXHAUSTED |
||
EngineRequestError.PermissionDenied |
Operation rejected due to insufficient permissions. | PERMISSION_DENIED |