mirror of
https://github.com/purocean/yn.git
synced 2026-10-16 07:26:07 +08:00
feat: add prompt of EACCES error
This commit is contained in:
+1
-1
@@ -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({
|
||||
|
||||
@@ -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': {
|
||||
|
||||
@@ -144,7 +144,7 @@ const data: BaseLanguage = {
|
||||
}
|
||||
},
|
||||
'error': {
|
||||
'EADDRINUSE': '端口 (%s) 已被使用,请在设置中配置一个其他端口',
|
||||
'EADDRINUSE': '端口 (%s) 已被使用或无权限监听,请在设置中配置一个其他端口',
|
||||
}
|
||||
},
|
||||
'quit-check-dialog': {
|
||||
|
||||
Reference in New Issue
Block a user