Example #1
0
 protected void CatchException(CommandErrorEventArgs e)
 {
     Database.OnCommandError(e);
     if (e.ThrowException == true)
     {
         var ex = this.CreateException(e);
         ExceptionDispatchInfo.Capture(ex).Throw();
     }
 }
Example #2
0
 protected void CatchException(CommandErrorEventArgs e)
 {
     Database.OnCommandError(e);
     if (e.ThrowException == true)
     {
         var ex = this.CreateException(e);
         throw ex;
     }
 }