Skip to content

Commit

Permalink
Include in console
Browse files Browse the repository at this point in the history
  • Loading branch information
Mindgamesnl committed Mar 31, 2024
1 parent 67e70ee commit 4b93e7d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion client/public/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":1,"buildMinor":125,"buildRevision":237,"buildTag":"dev","buildDate":"Sun Mar 31 2024","build":"1.125.237 dev"}
{"buildMajor":1,"buildMinor":125,"buildRevision":238,"buildTag":"dev","buildDate":"Sun Mar 31 2024","build":"1.125.238 dev"}
39 changes: 21 additions & 18 deletions client/src/client/services/voice/VoiceModule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,25 +136,28 @@ export const VoiceModule = new class IVoiceModule {
});
toast.error('Voice chat has crashed, please reload the page to try again. Feel free to contact support if this keeps happening, as you might have a permission issue.', { autoClose: false });

if (source) {
const fileName = source.fileName || 'unknown';
const lineNumber = source.lineNumber || 'unknown';
const columnNumber = source.columnNumber || 'unknown';
const stack = source.stack || 'unknown';
const error = source.error || 'unknown';
const errorMessage = source.message || 'unknown';
const readable = {
source: 'voice:panic',
readableMessage: message,
errorMessage,
fileName,
lineNumber,
columnNumber,
stack,
error,
};
reportVital(`voice-panic:${JSON.stringify(readable)}`);
if (source == null) {
source = {};
}

const fileName = source.fileName || 'unknown';
const lineNumber = source.lineNumber || 'unknown';
const columnNumber = source.columnNumber || 'unknown';
const stack = source.stack || 'unknown';
const error = source.error || 'unknown';
const errorMessage = source.message || 'unknown';
const readable = {
source: 'voice:panic',
readableMessage: message,
errorMessage,
fileName,
lineNumber,
columnNumber,
stack,
error,
};
reportVital(`voice-panic:${JSON.stringify(readable)}`);
console.error('Voice chat has crashed:', readable);

Check warning on line 160 in client/src/client/services/voice/VoiceModule.jsx

View workflow job for this annotation

GitHub Actions / build (20.*)

Unexpected console statement
}

isReady() {
Expand Down
2 changes: 1 addition & 1 deletion client/src/metadata.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"buildMajor":1,"buildMinor":125,"buildRevision":237,"buildTag":"dev","buildDate":"Sun Mar 31 2024","build":"1.125.237 dev"}
{"buildMajor":1,"buildMinor":125,"buildRevision":238,"buildTag":"dev","buildDate":"Sun Mar 31 2024","build":"1.125.238 dev"}

0 comments on commit 4b93e7d

Please sign in to comment.