You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Set default Contract exception to InvalidOperationException
Previously, if `Contract.Requires(bool)` or `Contract.Assumes(bool)` were called without specifying an exception type, then an `Exception` was thrown. This is now updated to throw the more specific `InvalidOperationException`. If implementors want more control over this, they should prefer to call `Contract.Requires<T>(bool)` or `Contract.Assumes<T>(bool)`.
As `InvalidOperationException` derives from `Exception`, this shouldn't be a breaking change, but will provide implementors more flexibility in capturing exceptions raised by this library.
0 commit comments