SDKException class

Throwable wrapper around the canonical pb.SDKError proto.

Implemented types

Constructors

SDKException(SDKError error, {Object? underlyingError})

Properties

category ErrorCategory
Convenience: error category from the underlying proto.
no setter
code ErrorCode
Convenience: error code from the underlying proto.
no setter
error SDKError
Underlying proto carrying code, category, message, context, ABI code.
final
fieldPath String?
Dot-separated path to the field that triggered a validation failure (e.g. "STTOptions.sampleRate"). Populated by the generated validate() helpers under lib/generated/convenience/ so callers can programmatically identify the failing field without parsing the human-readable message.
no setter
hashCode int
The hash code for this object.
no setterinherited
message String
Convenience: human-readable message from the underlying proto.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
underlyingError Object?
Optional underlying cause.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

alreadyInitialized([String? message]) SDKException
authenticationFailed(String reason) SDKException
cancelled([String message = 'Operation cancelled']) SDKException
Common shortcut: cancelled (mirrors Swift SDKException.cancelled).
componentNotInitialized(String component) SDKException
componentNotReady(String component) SDKException
contextTooLong(int provided, int maximum) SDKException
costLimitExceeded(double estimated, double limit) SDKException
databaseInitializationFailed(Object error) SDKException
downloadFailed(String url, [Object? error]) SDKException
environmentMismatch(String reason) SDKException
featureNotAvailable(String feature) SDKException
frameworkNotAvailable(String framework) SDKException
from(Object? error, {ErrorCategory category = pb_enum.ErrorCategory.ERROR_CATEGORY_INTERNAL}) SDKException
Convert any error into an SDKException (mirrors Swift from(_:)).
fromResult(int code) SDKException?
Map a rac_result_t (signed C ABI error code) to an SDKException via the canonical commons helper rac_result_to_proto_error, deserializing the returned SDKError proto. Returns null for RAC_SUCCESS (0).
generationFailed(String reason) SDKException
generationTimeout([String? reason]) SDKException
hardwareUnsupported(String feature) SDKException
insufficientStorage(int required, int available) SDKException
internalError([String? message]) SDKException
invalidAPIKey([String? message]) SDKException
invalidConfiguration(String detail) SDKException
invalidInput(String reason) SDKException
invalidState(String reason) SDKException
loadingFailed(String reason) SDKException
make({required ErrorCode code, required String message, ErrorCategory category = pb_enum.ErrorCategory.ERROR_CATEGORY_COMPONENT, Object? underlyingError}) SDKException
Generic factory (mirrors Swift SDKException.make).
modelIncompatible(String modelId, String reason) SDKException
modelLoadFailed(String modelId, [Object? error]) SDKException
modelNotDownloaded(String message) SDKException
modelNotFound(String modelId) SDKException
modelValidationFailed(String modelId, List<String> errors) SDKException
networkError(String reason) SDKException
networkUnavailable([String? message]) SDKException
notImplemented(String feature) SDKException
notInitialized([String? message]) SDKException
processingFailed(String message) SDKException
rateLimitExceeded([String? message]) SDKException
requestFailed(Object error) SDKException
resourceExhausted([String? message]) SDKException
serverError(String reason) SDKException
serviceUnavailable([String? message]) SDKException
storageError(String reason) SDKException
storageFull([String? message]) SDKException
sttNotAvailable(String message) SDKException
throwIfError(int code) → void
Throw an SDKException if code indicates failure (non-zero). Mirrors Swift's SDKException.throwIfError(_:).
timeout(String reason) SDKException
tokenLimitExceeded(int requested, int maximum) SDKException
ttsNotAvailable(String message) SDKException
unknown([String? message]) SDKException
Common shortcut: unknown (mirrors Swift wrapping path for arbitrary non-SDK errors).
unsupportedModality(String modality) SDKException
validationFailed(String reason, {required String fieldPath}) SDKException
Validation failure.
vlmCancelled([String? message]) SDKException
vlmInvalidImage([String? message]) SDKException
vlmModelLoadFailed(String message) SDKException
vlmNotInitialized([String? message]) SDKException
vlmProcessingFailed(String message) SDKException
voiceAgentNotReady(String message) SDKException