@snap/camera-kit
Version:
Camera Kit Web
18 lines • 778 B
TypeScript
/**
* Returns a stack trace for a given error, and also appends the stack trace of any nested error, if one exists.
* @param error Error to stringify.
* @returns Error stack trace.
*/
export declare function stringifyError(error: Error): string;
/**
* Returns an error message for a given error, and also appends the error message of any nested error,
* if one exists. It DOES NOT append error stack trace.
* @param error Error to stringify.
* @returns Error message including nested error messages.
*/
export declare function stringifyErrorMessage(error: Error): string;
/**
* If given a value of type Error, return it – otherwise wrap the value in an Error.
*/
export declare function ensureError(error: unknown): Error;
//# sourceMappingURL=errorHelpers.d.ts.map