Index: Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs =================================================================== diff -u -r62b1cddf783943601dbfb2d13559b1af62c55a32 -rc0b144c2d29fc18197c64ba77a8bfc5a976f9c9c --- Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs (.../GuiTestHelper.cs) (revision 62b1cddf783943601dbfb2d13559b1af62c55a32) +++ Core/Common/test/Core.Common.TestUtil/GuiTestHelper.cs (.../GuiTestHelper.cs) (revision c0b144c2d29fc18197c64ba77a8bfc5a976f9c9c) @@ -70,16 +70,16 @@ } } - public void RethrowUnhandledException() + public static void RethrowUnhandledException() { if (unhandledThreadExceptionOccured) { - ThrowExceptionThatOccuredInThread(exception); + throw new UnhandledException("Unhandled thread exception: " + exception.Message, exception, exception.StackTrace); } if (appDomainExceptionOccured) { - ThrowExceptionThatOccuredInDomain(exception); + throw new UnhandledException("Unhandled app domain exception: " + exception.Message, exception, exception.StackTrace); } } @@ -90,21 +90,11 @@ appDomainExceptionOccured = false; } - private static void ThrowExceptionThatOccuredInThread(Exception e) - { - throw new UnhandledException("Unhandled thread exception: " + e.Message, e, e.StackTrace); - } - - private static void ThrowExceptionThatOccuredInDomain(Exception e) - { - throw new UnhandledException("Unhandled app domain exception: " + e.Message, e, e.StackTrace); - } - private static void CurrentDispatcher_UnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { unhandledThreadExceptionOccured = true; exception = e.Exception; - ThrowExceptionThatOccuredInThread(exception); + RethrowUnhandledException(); } private static void InitializeSynchronizatonObject() @@ -126,14 +116,14 @@ appDomainExceptionOccured = true; exception = e.ExceptionObject as Exception; - ThrowExceptionThatOccuredInDomain(exception); + RethrowUnhandledException(); } private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) { unhandledThreadExceptionOccured = true; exception = e.Exception; - ThrowExceptionThatOccuredInThread(exception); + RethrowUnhandledException(); } /// Index: Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs =================================================================== diff -u -rd6e6eadf4a2521df75b6d371bacbb181a43058a3 -rc0b144c2d29fc18197c64ba77a8bfc5a976f9c9c --- Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision d6e6eadf4a2521df75b6d371bacbb181a43058a3) +++ Core/Common/test/Core.Common.TestUtil/WindowsFormsTestHelper.cs (.../WindowsFormsTestHelper.cs) (revision c0b144c2d29fc18197c64ba77a8bfc5a976f9c9c) @@ -195,7 +195,7 @@ if (guiTestHelper.Exception != null) { - guiTestHelper.RethrowUnhandledException(); + GuiTestHelper.RethrowUnhandledException(); } } Index: Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs =================================================================== diff -u -rd6e6eadf4a2521df75b6d371bacbb181a43058a3 -rc0b144c2d29fc18197c64ba77a8bfc5a976f9c9c --- Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision d6e6eadf4a2521df75b6d371bacbb181a43058a3) +++ Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision c0b144c2d29fc18197c64ba77a8bfc5a976f9c9c) @@ -181,7 +181,7 @@ if (guiTestHelper.Exception != null) { - guiTestHelper.RethrowUnhandledException(); + GuiTestHelper.RethrowUnhandledException(); } } }