mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
improve ux on crash recovery
This commit is contained in:
@@ -1966,7 +1966,7 @@
|
|||||||
"delete_failed": "Failed to delete screenshot metadata"
|
"delete_failed": "Failed to delete screenshot metadata"
|
||||||
},
|
},
|
||||||
"crash": {
|
"crash": {
|
||||||
"vrcx_crash": "VRCX has recovered from a crash."
|
"vrcx_reload": "VRCX was reloaded for stability"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"prompt": {
|
"prompt": {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export async function initSentry(app) {
|
|||||||
release: version,
|
release: version,
|
||||||
replaysSessionSampleRate: 0,
|
replaysSessionSampleRate: 0,
|
||||||
replaysOnErrorSampleRate: 1.0,
|
replaysOnErrorSampleRate: 1.0,
|
||||||
tracesSampleRate: 0.001,
|
tracesSampleRate: 0.0001,
|
||||||
beforeSend(event, hint) {
|
beforeSend(event, hint) {
|
||||||
const error = hint.originalException;
|
const error = hint.originalException;
|
||||||
if (error && typeof error.message === 'string') {
|
if (error && typeof error.message === 'string') {
|
||||||
|
|||||||
+8
-4
@@ -531,10 +531,14 @@ export const useVrcxStore = defineStore('Vrcx', () => {
|
|||||||
if (command.startsWith('crash/')) {
|
if (command.startsWith('crash/')) {
|
||||||
const crashMessage = command.replace('crash/', '');
|
const crashMessage = command.replace('crash/', '');
|
||||||
console.error('VRCX recovered from crash:', crashMessage);
|
console.error('VRCX recovered from crash:', crashMessage);
|
||||||
ElMessageBox.alert(
|
const Sentry = await import('@sentry/vue');
|
||||||
crashMessage,
|
Sentry.captureMessage(`crash message: ${crashMessage}`, {
|
||||||
t('message.crash.vrcx_crash')
|
level: 'fatal'
|
||||||
).catch(() => {});
|
});
|
||||||
|
ElMessage({
|
||||||
|
message: t('message.crash.vrcx_reload'),
|
||||||
|
type: 'success'
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
eventLaunchCommand(command);
|
eventLaunchCommand(command);
|
||||||
|
|||||||
Reference in New Issue
Block a user