Exemple #1
0
        private static void OnUnobservedTaskException( object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e )
        {
            // prevent exception escalation
            e.SetObserved( );

            _logger.LogError( String.Format( "task Exception: '{0}'\r\nTrace:\r\n{1}", e.Exception.Message, e.Exception.StackTrace ) );
        }
		void TaskScheduler_UnobservedTaskException(object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e)
		{
			e.SetObserved();
			System.Diagnostics.Debug.WriteLine("Unobserved Exception. Message: {0}, Stack: {1}", e.Exception.Message, e.Exception.StackTrace);
		}
Exemple #3
0
 /// <summary>
 /// Invoked when the task schedule sees an exception occur
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e">Details about the task exception.</param>
 private void TaskScheduler_UnobservedTaskException(object sender, System.Threading.Tasks.UnobservedTaskExceptionEventArgs e)
 {
     e.SetObserved();
     Platform.Current.AppUnhandledException(e.Exception);
 }