FailedAssertionException

Description

sealed class Tinman.Core.FailedAssertionException

Derived from

TinmanException

This exception is raised when a runtime code assertion has failed.

Code assertions are used to validate the current application state. Evaluation of assertions is limited to DEBUG mode in order to increase performance. An FailedAssertionException indicates a programming error, so this kind of exception is never documented explicitly.

Public / Constructors

Bad​Lifecycle

2 overloads


public static method BadLifecycle1 → (3)

source in : string

The error source (see TinmanError.ErrorSource).

obj in : ILifecycleState

The object.

expected in : LifecycleState

The expected lifecycle.

returns → FailedAssertionException

The ready-to-throw exception.

The requested operation is not valid in the objects current lifecycle.


public static method BadLifecycle2 → (4)

source in : string

The error source (see TinmanError.ErrorSource).

obj in : ILifecycleState

The object.

expectedA in : LifecycleState

The expected lifecycle (first alternative).

expectedB in : LifecycleState

The expected lifecycle (second alternative).

returns → FailedAssertionException

The ready-to-throw exception.

The requested operation is not valid in the objects current lifecycle.

Bad​State


public static method BadState → (2)

source in : string

The error source (see TinmanError.ErrorSource).

why opt : string = null

Why is the operation not valid?

returns → FailedAssertionException

The ready-to-throw exception.

The requested operation is not valid for the objects current state.