diff --git a/main.js b/main.js index 84987752584f..a6a10d878544 100644 --- a/main.js +++ b/main.js @@ -1527,7 +1527,10 @@ ipc.handle('show-calling-permissions-popup', async (event, forCamera) => { try { await showPermissionsPopupWindow(true, forCamera); } catch (error) { - console.error(error); + console.error( + 'show-calling-permissions-popup error:', + error && error.stack ? error.stack : error + ); } }); ipc.on('close-permissions-popup', () => { diff --git a/ts/components/conversation/CallingNotification.tsx b/ts/components/conversation/CallingNotification.tsx index 565503afe9f0..e735262f9942 100644 --- a/ts/components/conversation/CallingNotification.tsx +++ b/ts/components/conversation/CallingNotification.tsx @@ -60,7 +60,9 @@ export const CallingNotification: React.FC = React.memo(props => { callType = 'video'; break; default: - window.log.error(missingCaseError(props)); + window.log.error( + `CallingNotification missing case: ${missingCaseError(props)}` + ); return null; } diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 30e04258fcbc..4145e255f990 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -865,7 +865,11 @@ export class MessageModel extends window.Backbone.Model { }; } default: - window.log.error(missingCaseError(callHistoryDetails)); + window.log.error( + `getPropsForCallHistory: missing case ${missingCaseError( + callHistoryDetails + )}` + ); return undefined; } } diff --git a/ts/util/assert.ts b/ts/util/assert.ts index 1c28e1b3096c..378bc00147f5 100644 --- a/ts/util/assert.ts +++ b/ts/util/assert.ts @@ -16,6 +16,6 @@ export function assert(condition: unknown, message: string): asserts condition { } throw err; } - log.error(err); + log.error('assert failure:', err && err.stack ? err.stack : err); } } diff --git a/ts/util/callingNotification.ts b/ts/util/callingNotification.ts index bde2c2cfb95e..159aca17f46b 100644 --- a/ts/util/callingNotification.ts +++ b/ts/util/callingNotification.ts @@ -102,7 +102,11 @@ export function getCallingNotificationText( case CallMode.Group: return getGroupCallNotificationText(notification, i18n); default: - window.log.error(missingCaseError(notification)); + window.log.error( + `getCallingNotificationText: missing case ${missingCaseError( + notification + )}` + ); return ''; } }