Skip to content

Commit

Permalink
Handle possible error in ScoutJsModel creation
Browse files Browse the repository at this point in the history
  • Loading branch information
mvilliger committed Apr 26, 2024
1 parent b200273 commit dce3b0e
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2023 BSI Business Systems Integration AG
* Copyright (c) 2010, 2024 BSI Business Systems Integration AG
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -47,6 +47,11 @@ class JsModelManager(val project: Project) : NodeModulesProviderSpi, Disposable
} catch (e: Exception) {
SdkLog.warning("Error creating Scout JS model for module '{}'.", module.name, e)
null
} catch (e: AssertionError) {
// Might be thrown if a VCS update is changing files while creating the ScoutJsModel
// E.g. thrown from ResolveScopeManagerImpl.getDefaultResolveScope when the old file gets invalid.
SdkLog.warning("Error creating Scout JS model for module '{}'.", module.name, e)
null
}
}

Expand Down

0 comments on commit dce3b0e

Please sign in to comment.