예제 #1
0
 /// <summary>
 /// Wraps a method call in a try/catch block, passing an ArgumentOutOfRangeException exception to the standard error message routine.
 /// </summary>
 /// <param name="master">The master.</param>
 /// <param name="method">The method.</param>
 public static void ExceptionHandler(IbaMasterPage master, ExceptionHandlerMethod method)
 {
     try
     {
         method();
     }
     catch (ArgumentOutOfRangeException outOfRange)
     {
         Utility.LogSiteError(outOfRange);
         master.SetErrorMessage(outOfRange.Message);
     }
     catch (InvalidOperationException invalid)
     {
         Utility.LogSiteError(invalid);
         master.SetErrorMessage(invalid.Message);
     }
 }