# Members that throw
Members that throw exceptions can be excluded from serialization based on the exception type or properties.
By default members that throw `NotImplementedException` or `NotSupportedException` are ignored.
Note that this is global for all members on all types.
Ignore by exception type:
```cs
[Fact]
public Task CustomExceptionProp()
{
var target = new WithCustomException();
var settings = new VerifySettings();
settings.IgnoreMembersThatThrow();
return Verify(target, settings);
}
[Fact]
public Task CustomExceptionPropFluent()
{
var target = new WithCustomException();
return Verify(target)
.IgnoreMembersThatThrow();
}
```
snippet source | anchor
Or globally:
```cs
VerifierSettings.IgnoreMembersThatThrow();
```
snippet source | anchor
Result:
```txt
{}
```
snippet source | anchor
Ignore by exception type and expression:
```cs
[Fact]
public Task ExceptionMessageProp()
{
var target = new WithExceptionIgnoreMessage();
var settings = new VerifySettings();
settings.IgnoreMembersThatThrow(_ => _.Message == "Ignore");
return Verify(target, settings);
}
[Fact]
public Task ExceptionMessagePropFluent()
{
var target = new WithExceptionIgnoreMessage();
return Verify(target)
.IgnoreMembersThatThrow(_ => _.Message == "Ignore");
}
```
snippet source | anchor
Or globally:
```cs
VerifierSettings.IgnoreMembersThatThrow(_ => _.Message == "Ignore");
```
snippet source | anchor
Result:
```txt
{}
```
snippet source | anchor