<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="10.0.10" />

Microsoft.Extensions.Hosting.HostAbortedException

public sealed class HostAbortedException : Exception
The exception that is thrown when an IHost is stopped to indicate the Host is stopping gracefully. This exception should not be thrown or handled by user code.

Initializes a new instance of the HostAbortedException class with a system-supplied error message.

public HostAbortedException(string message)

Initializes a new instance of the HostAbortedException class with a specified error message.

public HostAbortedException(string message, Exception innerException)

Initializes a new instance of the HostAbortedException class with a specified error message and a reference to the inner exception that is the cause of this exception.