jonsequitur / jonsequitur/Its.Validation
Validate no exception thrown; but if thrown use Exception message in WithErrorMessage
Open
- Dominant language
- C#
- Stars
- 17
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
I'd like to validate that an object can be constructed without throwing an exception, If an exception is thrown, I'd like to report the Exception message.
I'm trying an approach like this - but not sure if it can be made to work? Is there a better way to do this?
```
Validate.That(
t =>
{
new MyType(...);
return true;
})
.Handle()
.WithErrorMessage( )
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.