[admob][android] Add util to convert code + message to JS Error

This commit is contained in:
Elliot Hesp 2017-05-26 17:56:04 +01:00
parent 1b8a2826ac
commit d9adef31a5
1 changed files with 6 additions and 0 deletions

View File

@ -327,3 +327,9 @@ export function generatePushID(serverTimeOffset?: number = 0): string {
return id;
}
export function nativeToJSError(code: string, message: string) {
const error = new Error(message);
error.code = code;
return error;
}