Table.WithErrorContext
TableInternalAssociates an error context string with a value. Intended for internal use only.
Syntax
Table.WithErrorContext(value as any, context as text) as anyParameters
| Name | Type | Required | Description |
|---|---|---|---|
value | any | Yes | The value to associate with the error context. |
context | text | Yes | A text string providing error context information. |
Return Value
any — The value with the specified error context attached.
Remarks
This function is intended for internal use only. It is part of the Power Query engine's error-handling infrastructure and is not designed for use in user-authored queries.
Table.WithErrorContext attaches a context string to a value, which the engine uses to provide more informative error messages when operations fail. The behavior and parameters of this function may change without notice between Power Query versions.
Examples
Example 1: Basic usage (internal function)
let
Result = Table.WithErrorContext(Sales, "Loading sales data")
in
ResultCompatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks