feat: add prompt of EACCES error

This commit is contained in:
purocean
2023-10-26 11:34:12 +08:00
parent 831880ea9c
commit 386a27f4dc
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -430,7 +430,7 @@ const serve = () => {
server.on('error', (e: Error) => {
console.error(e)
if (e.message.includes('EADDRINUSE')) {
if (e.message.includes('EADDRINUSE') || e.message.includes('EACCES')) {
// wait for electron app ready.
setTimeout(async () => {
await dialog.showMessageBox({
+1 -1
View File
@@ -143,7 +143,7 @@ const data = {
}
},
'error': {
'EADDRINUSE': 'Port (%s) is in use, please configure another port in the settings',
'EADDRINUSE': 'Port (%s) is in use or insufficient permissions, please configure another port in the settings',
},
},
'quit-check-dialog': {
+1 -1
View File
@@ -144,7 +144,7 @@ const data: BaseLanguage = {
}
},
'error': {
'EADDRINUSE': '端口 (%s) 已被使用,请在设置中配置一个其他端口',
'EADDRINUSE': '端口 (%s) 已被使用或无权限监听,请在设置中配置一个其他端口',
}
},
'quit-check-dialog': {