Dav*_*Dev 5 .net c# exception-handling exception
我正在编写调用以下方法的代码 Windows.Networking.PushNotifications
// Summary:
// Creates objects that you use to retrieve push notification channels from
// the Windows Push Notification Services (WNS). These channels are bound to
// an app or secondary tile.
[Threading(ThreadingModel.MTA)]
[Version(100794368)]
public static class PushNotificationChannelManager
{
// Summary:
// Creates an object, bound to the calling app, through which you retrieve a
// push notification channel from Windows Push Notification Services (WNS).
//
// Returns:
// The object, bound to the calling app, that is used to request a PushNotificationChannel
// from the Windows Push Notification Services (WNS).
[Overload("CreatePushNotificationChannelForApplicationAsync")]
public static IAsyncOperation<PushNotificationChannel> CreatePushNotificationChannelForApplicationAsync();
}
Run Code Online (Sandbox Code Playgroud)
我想确保涵盖所有可以抛出异常的情况并适当地处理每个情况.我是否有可能获得可能引发的不同类型的异常列表以及可能导致它们的不同情况?
我不想只是抓住一切
catch(Exception ex) { }
Run Code Online (Sandbox Code Playgroud)
此MSDN文章指出"如果您在没有数据连接时尝试注册WNS推送通知通道,则会引发异常".但是,它没有说明什么类型的异常,或者是否存在可以抛出异常的其他情况.
如何确定是否存在其他可能的异常类型?
归档时间: |
|
查看次数: |
171 次 |
最近记录: |