1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 01:36:22 +00:00

Cleaner catch

This commit is contained in:
Jannick Hemelhof
2017-10-09 14:04:02 +02:00
parent f7cdafb087
commit 53d3f51c74

View File

@@ -29,7 +29,9 @@ function recordDynamicCustomEvent (type) {
try {
mobileAnalyticsClient.recordEvent(type)
} catch (analyticsError) {
console.error(analyticsError)
if (analyticsError instanceof ReferenceError) {
console.log(analyticsError.name + ': ' + analyticsError.message)
}
}
}
@@ -40,7 +42,9 @@ function recordStaticCustomEvent () {
uiColorTheme: ConfigManager.default.get().ui.theme
})
} catch (analyticsError) {
console.error(analyticsError)
if (analyticsError instanceof ReferenceError) {
console.log(analyticsError.name + ': ' + analyticsError.message)
}
}
}