Skip to content

Commit dc50aea

Browse files
author
farfromrefuge
committed
fix(android): error on init sentry
1 parent df92781 commit dc50aea

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/wrapper.android.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,14 @@ export namespace NATIVE {
389389
Object.keys(otherOptions).forEach(k => {
390390
const methodName = `set${capitalize(k)}`;
391391
if (typeof config[methodName] === 'function') {
392-
config[methodName](otherOptions[k]);
392+
const value = otherOptions[k];
393+
if (typeof value === 'number') {
394+
config[methodName](java.lang.Double.valueOf(value));
395+
396+
} else {
397+
config[methodName](value);
398+
399+
}
393400
}
394401
});
395402
// if (options.sendClientReports) {
@@ -560,7 +567,7 @@ export namespace NATIVE {
560567
nSentryOptions = config;
561568
sentryOptions = options;
562569
} catch(err) {
563-
console.error('Error starting Sentry', err);
570+
console.error('Error starting Sentry', err, err.stack);
564571
throw err;
565572
}
566573

0 commit comments

Comments
 (0)