mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-12-25 02:00:12 +08:00
@@ -4,4 +4,7 @@
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<legacyCorruptedStateExceptionsPolicy enabled="true" />
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -47,15 +47,37 @@ namespace QuickLook
|
||||
{
|
||||
_viewWindow.BeginShow(matchedPlugin, path);
|
||||
}
|
||||
catch (Exception e) // if current plugin failed, switch to default one
|
||||
catch (Exception e) // if current plugin failed, switch to default one.
|
||||
{
|
||||
_viewWindow.Close();
|
||||
|
||||
Debug.WriteLine(e.ToString());
|
||||
Debug.WriteLine(e.StackTrace);
|
||||
|
||||
if (matchedPlugin.GetType() != PluginManager.GetInstance().DefaultPlugin)
|
||||
{
|
||||
matchedPlugin.Dispose();
|
||||
_viewWindow.BeginShow(PluginManager.GetInstance().DefaultPlugin.CreateInstance<IViewer>(), path);
|
||||
matchedPlugin = PluginManager.GetInstance().DefaultPlugin.CreateInstance<IViewer>();
|
||||
BeginShowNewWindow(matchedPlugin, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
catch // Catch SEH exceptions here.
|
||||
{
|
||||
_viewWindow.Close();
|
||||
|
||||
if (matchedPlugin.GetType() != PluginManager.GetInstance().DefaultPlugin)
|
||||
{
|
||||
matchedPlugin.Dispose();
|
||||
matchedPlugin = PluginManager.GetInstance().DefaultPlugin.CreateInstance<IViewer>();
|
||||
BeginShowNewWindow(matchedPlugin, path);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user