示例#1
0
 /// <summary>
 /// Try to execute the given <see cref="IRunnable"/> and just log if it throws a <see cref="Exception"/>.
 /// </summary>
 /// <param name="task"></param>
 protected static void SafeExecute(IRunnable task)
 {
     try
     {
         task.Run();
     }
     catch (Exception ex)
     {
         Logger.ATaskRaisedAnException(task, ex);
     }
 }