Skip to content

The Free Software Media System - Server Backend & API

catch errors in entry point

Luke Pulverenti8380a92806f0
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs
index f50705834b..c260087b81 100644
--- a/MediaBrowser.ServerApplication/ApplicationHost.cs
+++ b/MediaBrowser.ServerApplication/ApplicationHost.cs
@@ -199,7 +199,17 @@ namespace MediaBrowser.ServerApplication
Logger.Info("Core startup complete");
- Parallel.ForEach(GetExports<IServerEntryPoint>(), entryPoint => entryPoint.Run());
+ Parallel.ForEach(GetExports<IServerEntryPoint>(), entryPoint =>
+ {
+ try
+ {
+ entryPoint.Run();
+ }
+ catch (Exception ex)
+ {
+ Logger.ErrorException("Error in {0}", ex, entryPoint.GetType().Name);
+ }
+ });
}
/// <summary>