Closed M-Zuber closed 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):
AggregateException
InnerException
TException
null
Always return an ArgumentException which might look like this:
ArgumentException
public static void Requires(bool predicate, string message = "") { if (!predicate) { Debug.WriteLine(message); throw new ArgumentException(message); } }
Exception
Closed w/ #91
Currently the method looks like this:
It should be possible to return the message passed in.
The possible options include (among others):
AggregateException
with theInnerException
set toTException
null
?Always return an
ArgumentException
which might look like this:Exception
type (which provides additional context)