{"record":{"id":"3317eaee8e39746f","repo":"qishibo/AnotherRedisDesktopManager","slug":"uncaught-exception-err","errorCode":null,"errorMessage":"Uncaught Exception: ${err}","messagePattern":"Uncaught Exception: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"src/main.js","lineNumber":38,"sourceCode":"\nVue.use(ElementUI, { size: 'small' });\nVue.config.productionTip = false;\n\n/* eslint-disable no-new */\nconst vue = new Vue({\n  el: '#app',\n  i18n,\n  components: { App },\n  template: '<App/>',\n});\n\n// handle uncaught exception\nprocess.on('uncaughtException', (err, origin) => {\n  if (!err) {\n    return;\n  }\n\n  vue.$message.error({\n    message: `Uncaught Exception: ${err}`,\n    duration: 5000,\n  });\n\n  vue.$bus.$emit('closeConnection');\n});\n\nexport default vue;\n","sourceCodeStart":20,"sourceCodeEnd":47,"githubUrl":"https://github.com/qishibo/AnotherRedisDesktopManager/blob/c149855106628babcdfb7675a8e7ba9434d2492a/src/main.js#L20-L47","documentation":"This is the app's global last-resort handler in src/main.js: process.on('uncaughtException') displays the stringified error as a 5-second toast and emits closeConnection. It is not an error source itself - the message body is whatever exception escaped, typically a bug in an unhandled promise or renderer code path, and the stack is not shown to the user.","triggerScenarios":"Any uncaught exception in the renderer: property access on undefined inside a promise without .catch, JSON.parse of malformed data, buffer handling bugs on unusual key names, incompatibilities between app version and server response shapes.","commonSituations":"App bugs triggered by binary/emoji key names, corrupted or unexpected server replies, or version skew (new server features, old app code). Usually reproducible by repeating the same action.","solutions":["Open DevTools for the renderer and reproduce the action to capture the real stack trace.","Update to the latest app version - if the crash is a known bug it is often already fixed.","Report the stack trace to the project issue tracker; the toast alone (no stack) is not enough to diagnose.","Reconnect afterwards - the handler force-closes the current connection."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// give every async UI action an explicit catch so the global handler stays a last resort\nclient.call(cmd, ...args)\n  .then(handleReply)\n  .catch((e) => this.$message.error(`Cmd failed: ${e.message}`));","preventionTips":["Attach .catch to every promise in UI code; the global handler exists for bugs, not for routine errors.","Keep DevTools enabled so uncaught exceptions can be traced via the console stack.","Report the stack, not the toast text - the toast stringifies the error without a trace."],"tags":["uncaught-exception","global-handler","process"],"backgroundTag":"uncaught-exception","analyzedSha":"c149855106628babcdfb7675a8e7ba9434d2492a","analyzedAt":"2026-08-22T09:06:28.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}