ErrorWithCause: add .code and .domain

This commit is contained in:
Marc Rousavy
2021-02-23 15:59:07 +01:00
parent d60a3a34bc
commit 934106e837
3 changed files with 22 additions and 1 deletions

View File

@@ -37,6 +37,20 @@ export type SystemError = 'system/no-camera-manager';
export type UnknownError = 'unknown/unknown';
export interface ErrorWithCause {
/**
* The native error's code.
*
* * iOS: `NSError.code`
* * Android: N/A
*/
code?: number;
/**
* The native error's domain.
*
* * iOS: `NSError.domain`
* * Android: N/A
*/
domain?: string;
/**
* The native error description (Localized on iOS)
*