aspnet.webapi.exceptions.mapper
1.0.2-9
AUCESS MAPPER Ermöglichen Sie eine Ausnahme von Apiexception und behandeln sie auf eine bestimmte Weise.
public void ConfigureServices ( IServiceCollection services )
{
services . AddExceptionMapper ( options =>
{
options . Map < System . ArgumentException , BadRequestException > ( ) ;
options . Map < System . NullReferenceException , ApiException > ( ) ;
} ) ;
} Nur .NET CORE SDK (2.2.0 und höher) erforderlich.