Skip to content

Commit feba007

Browse files
committed
Add debugging message to WP testing entry point.
1 parent ce8386e commit feba007

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

  • test/MsgPack.UnitTest.Silverlight.WindowsPhone

test/MsgPack.UnitTest.Silverlight.WindowsPhone/App.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Diagnostics;
33
using System.Resources;
4+
using System.Threading;
45
using System.Windows;
56
using System.Windows.Markup;
67
using System.Windows.Navigation;
@@ -20,6 +21,13 @@ public App()
2021
InitializeComponent();
2122
InitializePhoneApplication();
2223
InitializeLanguage();
24+
25+
if ( Thread.CurrentThread.CurrentUICulture.Name != "en-US" )
26+
{
27+
// It's cool.
28+
throw new NotSupportedException( "MSTest cannot run under non-en-US cultures. You must change display locale from Settings page and restart the Emulator. Current locale is :" + Thread.CurrentThread.CurrentUICulture.Name );
29+
}
30+
2331
if ( Debugger.IsAttached )
2432
{
2533
Application.Current.Host.Settings.EnableFrameRateCounter = true;
@@ -50,6 +58,7 @@ private void Application_UnhandledException( object sender, ApplicationUnhandled
5058
{
5159
if ( Debugger.IsAttached )
5260
{
61+
Debug.WriteLine( e.ExceptionObject );
5362
Debugger.Break();
5463
}
5564
}

0 commit comments

Comments
 (0)