Error containment
Power Query’s M language integrates containment-based programming principles. Let’s explore what that means for the evaluation of expressions.
Containment and propagation means that even if an error occurs while evaluating a particular value or member expression, it doesn’t necessarily stop the entire evaluation process. Instead, the error can be “contained” without automatically propagating to the top-level expression.
When an error occurs, it will cause the evaluation of the current member expression to stop; it effectively unwinds, or reverses, through the previously evaluated parts of the expression. However, as long as an error can be contained, it does not propagate to the top-level expression and a value may still be produced.
Imagine you have a table that contains a cell with an error; this error can be contained within a record field. The entry will be marked as having an error, and the error record will be...