Пример #1
0
 /// <summary> Returns wrapped runnable that ensures that if an exception occurs
 /// during the execution, the specified exception handler is invoked.
 /// </summary>
 /// <param name="runnable">runnable for which exceptions are to be intercepted
 /// </param>
 /// <param name="handler">the exception handler to call when exception occurs
 /// during execution of the given runnable
 /// </param>
 /// <returns> wrapped runnable
 /// </returns>
 /// <exception cref="System.ArgumentNullException">If either parameter is <c>null</c></exception>
 public static IRunnable AssignExceptionHandler(IRunnable runnable, UncaughtExceptionHandlerDelegate handler)
 {
     if ( runnable == null )
         throw new ArgumentNullException("runnable", "Runnable cannot be null");
     if ( handler == null )
         throw new ArgumentNullException("handler", "Handler cannot be null");
     return new AnonymousClassRunnable(runnable, handler);
 }
 /// <summary> Returns wrapped runnable that ensures that if an exception occurs
 /// during the execution, the specified exception handler is invoked.
 /// </summary>
 /// <param name="runnable">runnable for which exceptions are to be intercepted
 /// </param>
 /// <param name="handler">the exception handler to call when exception occurs
 /// during execution of the given runnable
 /// </param>
 /// <returns> wrapped runnable
 /// </returns>
 /// <exception cref="System.ArgumentNullException">If either parameter is <see lang="null"/></exception>
 public static IRunnable AssignExceptionHandler(IRunnable runnable, UncaughtExceptionHandlerDelegate handler)
 {
     if (runnable == null)
     {
         throw new ArgumentNullException("runnable", "Runnable cannot be null");
     }
     if (handler == null)
     {
         throw new ArgumentNullException("handler", "Handler cannot be null");
     }
     return(new AnonymousClassRunnable(runnable, handler));
 }
Пример #3
0
 public AnonymousClassRunnable(IRunnable runnable, UncaughtExceptionHandlerDelegate handler)
 {
     _runnable = runnable;
     _handler = handler;
 }
 public AnonymousClassRunnable(IRunnable runnable, UncaughtExceptionHandlerDelegate handler)
 {
     _runnable = runnable;
     _handler  = handler;
 }
Пример #5
0
 static extern void NSSetUncaughtExceptionHandler(UncaughtExceptionHandlerDelegate handler);