Table of Contents

Class NotExistsException

Namespace
VpnHood.Net.Toolkit.Exceptions
Assembly
VpnHood.Net.Toolkit.dll

The exception that is thrown when an object is not found. Its Data carries HttpStatusCode 404, for an API that maps it to its response.

public sealed class NotExistsException : Exception, ISerializable
Inheritance
NotExistsException
Implements
Inherited Members

Constructors

NotExistsException(string?)

Initializes a new instance of the NotExistsException class.

public NotExistsException(string? message = null)

Parameters

message string

The message, or null for the default one.

NotExistsException(string, Exception)

Initializes a new instance of the NotExistsException class.

public NotExistsException(string message, Exception innerException)

Parameters

message string

The message.

innerException Exception

The exception that is the cause of this one.

Methods

Is(Exception)

Determines, by a heuristic, whether an exception, or one of its inner exceptions, tells that an object was not found: a NotExistsException, a KeyNotFoundException, or the English messages of an empty LINQ or EF Core query, or of an EF Core change that affected no row.

public static bool Is(Exception ex)

Parameters

ex Exception

The exception.

Returns

bool

true if it tells so; otherwise, false.