NilException

open class NilException<T> : AnyNilException

An exception thrown when an unexpected nil value of a specific type is accessed. Catch this exception when you care about the specific type a nil value should have been.

  • Initializes a NilException.

    Declaration

    Swift

    public init(stackTrace: [String]? = nil)

    Parameters

    stackTrace

    The stack trace when the exception is thrown. Defaults to Thread.callStackSymbols.