IfError

Qubes 6.7 Returns the first parameter that is not an error.

Syntax

IfError(param1, param2, ...)
EstErreur(param1, param2, ...)
param1 = first value to check
param2 = second value to check
... = nth value to check

Remarks

This function can accept 1 to 99 parameters.
It applies the same rules as the IsError function.
If all parametes are errors, returns the last parameter, so it oftendesirable to have default value as last value.

See also IfFinite and coalescing operator.

Examples

IfError("hello", 0) = "hello"
IfError("#VAL!", "#ERR!", 0) = 0
IfError(1/0, 0) = +INF
IfError(1, 0) = 1

Classification

Logic