Skip to content

Commit 881fb94

Browse files
committed
Added some missing panic catchers
1 parent 4ab09ab commit 881fb94

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: handler/builder.go

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ func (handler *InoHandler) rebuildEnvironmentLoop() {
5454
// Regenerate preprocessed sketch!
5555
done := make(chan bool)
5656
go func() {
57+
defer streams.CatchAndLogPanic()
5758

5859
handler.progressHandler.Create("arduinoLanguageServerRebuild")
5960
handler.progressHandler.Begin("arduinoLanguageServerRebuild", &lsp.WorkDoneProgressBegin{

Diff for: handler/handler.go

+2
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ func (handler *InoHandler) HandleMessageFromIDE(ctx context.Context, conn *jsonr
179179
// method "initialize"
180180

181181
go func() {
182+
defer streams.CatchAndLogPanic()
183+
182184
// Start clangd asynchronously
183185
log.Printf("LS --- initializing workbench (queued)")
184186
handler.dataMux.Lock()

0 commit comments

Comments
 (0)