当前位置: 首页>>代码示例>>C#>>正文


C# Exception.ToBugSenseEx方法代码示例

本文整理汇总了C#中System.Exception.ToBugSenseEx方法的典型用法代码示例。如果您正苦于以下问题:C# Exception.ToBugSenseEx方法的具体用法?C# Exception.ToBugSenseEx怎么用?C# Exception.ToBugSenseEx使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Exception的用法示例。


在下文中一共展示了Exception.ToBugSenseEx方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CacheTestHandledException

		private string CacheTestHandledException (string uuid)
		{
			string res = "";
			
			Exception exc1 = new Exception ("Test exception");
			var request = new BugSenseExceptionRequest (exc1.ToBugSenseEx (null, true, "", "_ping|ev1|ev2"),
				BugSenseEnvironment.GetEnvironment ("test", "0.0.0.0", uuid, true),
				new Dictionary<string, string> () {
					{ "k1", "val1"},
					{ "k2", "val2"},
					{ "k3", "val3"}
			});
			
			LogError err = new LogError (request, false);
			Task.Run (async () => {
				res = await err.Execute ();
			}).Wait ();
			
			return res;
		}
开发者ID:JanZeman,项目名称:BugSense-WP8,代码行数:20,代码来源:TestTasks1.cs

示例2: HandleError

 /// <summary>
 /// Make sure to set screen size/orientation before calling this!
 /// </summary>
 public static void HandleError(Exception e, string comment)
 {
     var request = new BugSenseRequest(e.ToBugSenseEx(comment), Instance.GetEnvironment());
     try
     {
         Instance.Send(request);
     }
     catch (Exception ex1)
     {
     }
 }
开发者ID:Aranda,项目名称:BugSense-Windows-Phone-library,代码行数:14,代码来源:BugSenseHandler.cs

示例3: Handle

 private void Handle(Exception e, string comment, NotificationOptions options, bool throwExceptionAfterComplete = false)
 {
     if (DateTime.Now.AddSeconds(-1) < _lastMethodHandledCalledAt) {
         return;
     }
     _lastMethodHandledCalledAt = DateTime.Now;
     if (Debugger.IsAttached && !options.HandleWhileDebugging)//Dont send the error
         return;
     var request = new BugSenseRequest(e.ToBugSenseEx(comment), GetEnvironment());
     if (throwExceptionAfterComplete) {
         LogAndSend(request, true);
         return;
     }
     try {
         switch (options.Type) {
             case enNotificationType.MessageBox:
                 if (!NotificationBox.IsOpen())
                     NotificationBox.Show(options.Title, options.Text, new NotificationBoxCommand(Labels.OkMessage, () => { }));
                 LogAndSend(request);
                 break;
             case enNotificationType.MessageBoxConfirm:
                 if (!NotificationBox.IsOpen())
                     Scheduler.Dispatcher.Schedule(
                         () => {
                             try {
                                 if (!NotificationBox.IsOpen())
                                     NotificationBox.Show(options.Title, options.Text,
                                                          new NotificationBoxCommand(Labels.OkMessage, () => LogAndSend(request)),
                                                          new NotificationBoxCommand(Labels.CancelMessage, () => { }));
                             }
                             catch { }
                         });
                 break;
             default:
                 LogAndSend(request);
                 break;
         }
     }
     catch (Exception) {
         if (options.Type != enNotificationType.MessageBoxConfirm) {
             LogAndSend(request);
         }
     }
 }
开发者ID:hermitdave,项目名称:BugSense-Windows-Phone-library,代码行数:44,代码来源:BugSenseHandler.cs


注:本文中的System.Exception.ToBugSenseEx方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。