Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 97eec91

Browse files
authored
Add panic recovery in main (#1338)
Add panic recovery to the main config. Verified that this works by manually adding panic.
1 parent 04f0a48 commit 97eec91

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

platform/main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"github.com/QuesmaOrg/quesma/platform/logger"
2222
"github.com/QuesmaOrg/quesma/platform/persistence"
2323
"github.com/QuesmaOrg/quesma/platform/processors"
24+
"github.com/QuesmaOrg/quesma/platform/recovery"
2425
"github.com/QuesmaOrg/quesma/platform/schema"
2526
"github.com/QuesmaOrg/quesma/platform/table_resolver"
2627
"github.com/QuesmaOrg/quesma/platform/telemetry"
@@ -56,6 +57,8 @@ const EnableConcurrencyProfiling = false
5657
//}
5758

5859
func main() {
60+
defer recovery.LogPanic()
61+
5962
// TODO: Experimental feature, move to the configuration after architecture v2
6063
const mysql_passthrough_experiment = false
6164
if mysql_passthrough_experiment {

0 commit comments

Comments
 (0)