| Author |
Message |
iosub
Joined: 19 Oct 2010 Posts: 19
|
Posted: Tue Mar 08, 2011 11:00 pm Post subject: wp7 and throw new exception for quiting app |
|
|
HI
I'm using a hack to quit the wp7 SL app if the user cancel the login..
this is the code
namespace MSP.Phone.Exceptions
{
public class Custom
{
public class QuitException : Exception { }
public static void Quit()
{
throw new QuitException();
}
}
}
and on the app.xaml.cs
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (e.ExceptionObject is MSP.Phone.Exceptions.Custom.QuitException)
return;
if (System.Diagnostics.Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
System.Diagnostics.Debugger.Break();
}
}
my problem is that I have enable SA reporting, so every time the user cancel the login screen, the SA Reporting catch the execption.
Is there a way to cancel the SA reporting in this situation.. Maybe with a attribute??
Unfortunately WP7 does not have a app.quit option so this is the only way to quit the app.
any solution?
thanks! |
|
| Back to top |
|
 |
Chris.Allen
Joined: 12 Mar 2009 Posts: 442
|
Posted: Thu Mar 10, 2011 8:40 pm Post subject: |
|
|
| The most recent version of SA catches WPF exceptions and tries whenever possible to let the app *continue* which is what 99% of developers would generally wish to happen. |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group