Skip to content

Commit 3bdf893

Browse files
committed
Swallow exception for application insights while create function app
1 parent 27a687d commit 3bdf893

File tree

1 file changed

+2
-1
lines changed
  • PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/runner/library/function

1 file changed

+2
-1
lines changed

PluginsAndFeatures/azure-toolkit-for-intellij/src/com/microsoft/azure/toolkit/intellij/function/runner/library/function/CreateFunctionHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ private Map<String, String> bindingApplicationInsights() {
127127
try {
128128
insights = AzureSDKManager.getOrCreateApplicationInsights(ctx.getSubscription(), ctx.getResourceGroup(), ctx.getInsightsName(), region);
129129
instrumentationKey = insights.instrumentationKey();
130-
} catch (final IOException e) {
130+
} catch (final IOException | RuntimeException e) {
131+
// swallow exception for application insights, which should not block function creation
131132
Log.prompt(message("function.create.error.createApplicationInsightsFailed", ctx.getAppName()));
132133
}
133134
}

0 commit comments

Comments
 (0)