export type CustomError = { code: ErrorCode; message: string; }; declare class CustomException extends Error { code: ErrorCode; constructor(code: ErrorCode, message: string); } export declare enum ErrorCode { INVALID_RESULT = 0, INVALID_PARAM = 1, UNEXPECTED_ERROR = 2, OPERATION_CANCELED = 3, SERVICE_UNAVAILABLE = 4 } export declare function throw_if_error(sbj: any, Throwable: any): void; export declare class PaymentError extends CustomException { } export declare class RefundError extends CustomException { } export declare class SetupError extends CustomException { } export {}; //# sourceMappingURL=exceptions.d.ts.map