M-Zuber / MyHome

Home finance management
MIT License
24 stars 21 forks source link

Contract.Requires needs to be more customizable #90

Closed M-Zuber closed 8 years ago

M-Zuber commented 8 years ago

Currently the method looks like this:

public static void Requires<TException>(bool predicate, string message = "")
  where TException : Exception, new()
{
  if (!predicate)
  {
    Debug.WriteLine(message);
    throw new TException();
  }
}

It should be possible to return the message passed in.

The possible options include (among others):

M-Zuber commented 8 years ago

Closed w/ #91