mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-14 12:19:08 +00:00
keep stack trace when rethrowing exception
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
|
|
||||||
namespace QuickLook.Plugin.PDFViewer
|
namespace QuickLook.Plugin.PDFViewer
|
||||||
@@ -58,7 +59,7 @@ namespace QuickLook.Plugin.PDFViewer
|
|||||||
}), DispatcherPriority.Loaded).Wait();
|
}), DispatcherPriority.Loaded).Wait();
|
||||||
|
|
||||||
if (exception != null)
|
if (exception != null)
|
||||||
throw exception;
|
ExceptionDispatchInfo.Capture(exception).Throw();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Cleanup()
|
public void Cleanup()
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
@@ -131,7 +132,7 @@ namespace QuickLook
|
|||||||
DispatcherPriority.Render).Wait();
|
DispatcherPriority.Render).Wait();
|
||||||
|
|
||||||
if (thrown != null)
|
if (thrown != null)
|
||||||
throw thrown;
|
ExceptionDispatchInfo.Capture(thrown).Throw();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetOpenWithButtonAndPath()
|
private void SetOpenWithButtonAndPath()
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
|
using System.Runtime.ExceptionServices;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using QuickLook.Helpers;
|
using QuickLook.Helpers;
|
||||||
@@ -202,7 +203,7 @@ namespace QuickLook
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw;
|
ExceptionDispatchInfo.Capture(e).Throw();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user