예제 #1
0
 /// <include file='doc\Constraint.uex' path='docs/doc[@for="Constraint.CheckStateForProperty"]/*' />
 protected void CheckStateForProperty()
 {
     try {
         CheckState();
     }
     catch (Exception e) {
         throw ExceptionBuilder.BadObjectPropertyAccess(e.Message);
     }
 }
예제 #2
0
 /// <summary>
 /// Checks to ensure the DataRelation is a valid object, even if it doesn't
 /// belong to a <see cref='System.Data.DataSet'/>.
 /// </summary>
 protected void CheckStateForProperty()
 {
     try
     {
         CheckState();
     }
     catch (Exception e) when(ADP.IsCatchableExceptionType(e))
     {
         throw ExceptionBuilder.BadObjectPropertyAccess(e.Message);
     }
 }
 protected void CheckStateForProperty()
 {
     try
     {
         this.CheckState();
     }
     catch (Exception exception)
     {
         if (ADP.IsCatchableExceptionType(exception))
         {
             throw ExceptionBuilder.BadObjectPropertyAccess(exception.Message);
         }
         throw;
     }
 }