Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

Commit c939d82

Browse files
committed
fix(editor): do not log exception if the project initialization was cancelled (#1549)
1 parent 328ff93 commit c939d82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

app/src/main/java/com/itsaky/androidide/activities/editor/ProjectHandlerActivity.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ import com.itsaky.androidide.handlers.LspHandler.connectClient
3737
import com.itsaky.androidide.handlers.LspHandler.destroyLanguageServers
3838
import com.itsaky.androidide.lookup.Lookup
3939
import com.itsaky.androidide.lsp.IDELanguageClientImpl
40+
import com.itsaky.androidide.lsp.java.utils.CancelChecker
4041
import com.itsaky.androidide.preferences.internal.NO_OPENED_PROJECT
4142
import com.itsaky.androidide.preferences.internal.lastOpenedProject
4243
import com.itsaky.androidide.projects.ProjectManagerImpl
@@ -396,7 +397,10 @@ abstract class ProjectHandlerActivity : BaseEditorActivity() {
396397
releaseServerListener()
397398

398399
if (result == null || !result.isSuccessful || error != null) {
399-
log.error("An error occurred initializing the project with Tooling API", error)
400+
if (!CancelChecker.isCancelled(error)) {
401+
log.error("An error occurred initializing the project with Tooling API", error)
402+
}
403+
400404
ThreadUtils.runOnUiThread {
401405
postProjectInit(false, result?.failure)
402406
}

0 commit comments

Comments
 (0)