The OpenD Programming Language

assumeOk

Validates that the result doesn't contain an error value.

import mir.algebraic;
version(D_Exceptions)
alias assumeOk(alias visitor = naryFun!("", "a"), alias handler = .match) = handler!(some!visitor, none!throwMe)

Parameters

visitor

(compiletime) visitor function. Default value is naryFun!("", "a").

handler

(compiletime) visitor handler to use. Default value is match.

Throws

Throws an exception if at least one parameter passed to visitor satisfies isErr traits. If there is only one paramter (common case) and its value is Throwable, throws it. Otherwise, _all_ paramters will be printed to the exception message using mir.format.print.

Meta