/// <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)); }
public AnonymousClassRunnable(IRunnable runnable, UncaughtExceptionHandlerDelegate handler) { _runnable = runnable; _handler = handler; }
public AnonymousClassRunnable(IRunnable runnable, UncaughtExceptionHandlerDelegate handler) { _runnable = runnable; _handler = handler; }
static extern void NSSetUncaughtExceptionHandler(UncaughtExceptionHandlerDelegate handler);