ImageException Class

The base class of the exceptions describing image content, feature and resource-limit failures.

public class ImageException : Exception

Remarks

Catch a derived type to handle a specific failure category: UnknownImageFormatException (unrecognized signature), InvalidImageContentException (malformed or truncated recognized data), UnsupportedImageFeatureException (valid but unsupported feature, or a loss requiring an explicit policy), and ImageResourceLimitException (configured limit exceeded).

Other failures use the standard .NET exceptions: ArgumentException for invalid arguments, InvalidOperationException for invalid states, ObjectDisposedException after disposal, OperationCanceledException for cancellation, and IOException for I/O failures, which are propagated unchanged.

Inheritance
Exception ImageException

Constructors

NameDescription
ImageException()Initializes a new instance of the ImageException class.
ImageException(string?)Initializes a new instance of the ImageException class with a message.
ImageException(string?, Exception?)Initializes a new instance of the ImageException class with a message and an inner exception.

ImageException overloads

ImageException()

ImageException.cs

Initializes a new instance of the ImageException class.

public ImageException()

ImageException(string?)

ImageException.cs

Initializes a new instance of the ImageException class with a message.

public ImageException(string? message)
Parameters
message string?
The error message.

ImageException(string?, Exception?)

ImageException.cs

Initializes a new instance of the ImageException class with a message and an inner exception.

public ImageException(string? message, Exception? innerException)
Parameters
message string?
The error message.
innerException Exception?
The exception that caused this exception.