ImageException Class
The base class of the exceptions describing image content, feature and resource-limit failures.
public class ImageException : ExceptionRemarks
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
ExceptionImageException
Constructors
| Name | Description |
|---|---|
| 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.csInitializes a new instance of the ImageException class.
public ImageException()ImageException(string?)
ImageException.csInitializes a new instance of the ImageException class with a message.
public ImageException(string? message)Parameters
messagestring?- The error message.
ImageException(string?, Exception?)
ImageException.csInitializes a new instance of the ImageException class with a message and an inner exception.
Parameters
messagestring?- The error message.
innerExceptionException?- The exception that caused this exception.