react-native-malwarelytics
Version:
Malwarelytics for React Native protects your banking or fintech app from a broad range of mobile security threats with an industry-leading mobile threat intelligence solution.
44 lines • 1.74 kB
TypeScript
/**
* Error object reported in case of the error.
*/
export declare class MalwarelyticsError {
/**
* Error code
*/
readonly code: MalwarelyticsErrorCode;
/**
* Error message
*/
readonly message: string | undefined;
/**
* Original exception, if this is a "GENERIC_ERROR"
*/
readonly originalException: any;
/**
* Wrap any error into MalwarelyticsError object.
* @param error Error object to wrap.
* @returns `MalwarelyticsError` object created from given error.
*/
static wrap(error: any): MalwarelyticsError;
/**
* Construct error object.
* @param code Error
* @param message
* @param exception
*/
constructor(code: MalwarelyticsErrorCode, message?: string | undefined, exception?: any);
}
/**
* Error codes:
* - `"LINKING_ERROR"` - Library is not properly linked with the native code.
* - `"GENERIC_ERROR"` - Generic error. See `originalException` for more details.
* - `"WRONG_STATE"` - Method called in the wrong object's state.
* - `"INVALID_CONFIG"` - Invalid configuration object.
* - `"MISSING_CONFIG"` - Missing required object in configuration.
* - `"INVALID_PARAM"` - Method called with an invalid parameter.
* - `"MISSING_PARAM"` - Method called with a missing required parameter.
* - `"METHOD_NOT_SUPPORTED"` - Method is not supported on this platform.
* - `"METHOD_NOT_AVAILABLE"` - Method is not available in the current configuration.
*/
export type MalwarelyticsErrorCode = "LINKING_ERROR" | "GENERIC_ERROR" | "WRONG_STATE" | "INVALID_CONFIG" | "MISSING_CONFIG" | "INVALID_PARAM" | "MISSING_PARAM" | "METHOD_NOT_SUPPORTED" | "METHOD_NOT_AVAILABLE";
//# sourceMappingURL=MalwarelyticsError.d.ts.map