mirror of
https://github.com/Mahdi-zarei/nekoray.git
synced 2025-12-19 05:30:06 +08:00
Add panic recovery to catch the panic message
This commit is contained in:
parent
ca3da15056
commit
6296e6a8bd
@ -64,6 +64,13 @@ func RunCore() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
fmt.Println("Core panicked:")
|
||||||
|
fmt.Println(err)
|
||||||
|
os.Exit(0)
|
||||||
|
}
|
||||||
|
}()
|
||||||
fmt.Println("sing-box:", C.Version)
|
fmt.Println("sing-box:", C.Version)
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
runtimeDebug.SetMemoryLimit(2 * 1024 * 1024 * 1024) // 2GB
|
runtimeDebug.SetMemoryLimit(2 * 1024 * 1024 * 1024) // 2GB
|
||||||
|
|||||||
@ -970,7 +970,6 @@ void MainWindow::prepare_exit()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
hide();
|
hide();
|
||||||
// tray->hide();
|
|
||||||
Configs::dataStore->prepare_exit = true;
|
Configs::dataStore->prepare_exit = true;
|
||||||
//
|
//
|
||||||
RegisterHiddenMenuShortcuts(true);
|
RegisterHiddenMenuShortcuts(true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user