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
be9fa2b077
commit
c05e155f91
@ -64,6 +64,13 @@ func RunCore() {
|
||||
}
|
||||
|
||||
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()
|
||||
runtimeDebug.SetMemoryLimit(2 * 1024 * 1024 * 1024) // 2GB
|
||||
|
||||
@ -970,7 +970,6 @@ void MainWindow::prepare_exit()
|
||||
return;
|
||||
}
|
||||
hide();
|
||||
// tray->hide();
|
||||
Configs::dataStore->prepare_exit = true;
|
||||
//
|
||||
RegisterHiddenMenuShortcuts(true);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user