Skip to main content

UnexpectedTypeException Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Common.Exceptions

UnexpectedTypeException Class

Represents an exception that is thrown when an unexpected data type is encountered.

public class UnexpectedTypeException : System.InvalidOperationException

Inheritance System.ObjectSystem.ExceptionSystem.SystemExceptionSystem.InvalidOperationException → UnexpectedTypeException

Remarks

This exception is typically used to indicate an unexpected or invalid type for a parameter or variable. It provides information about the parameter name and the unexpected type encountered.

Constructors

UnexpectedTypeException(string, Type) Constructor

Creates the exception with a message naming the offending parameter and the runtime type observed.

public UnexpectedTypeException(string? paramName, System.Type paramType);

Parameters

paramName System.String

Name of the variable, parameter, or member whose type was unexpected.

paramType System.Type

The runtime type that the calling code did not know how to handle.