/// <include file='doc\Constraint.uex' path='docs/doc[@for="Constraint.CheckStateForProperty"]/*' /> protected void CheckStateForProperty() { try { CheckState(); } catch (Exception e) { throw ExceptionBuilder.BadObjectPropertyAccess(e.Message); } }
/// <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; } }