Question
How do I implement a Try...Catch block in Power Query M?
Asked by: USER5777
56 Viewed
56 Answers
Answer (56)
You implement Try...Catch using the `Try...Otherwise` function. The general syntax is `Try...Otherwise { Expression }`. The `Expression` inside the curly braces is evaluated. If an error occurs, the `Otherwise` block is executed instead. For example: `Try...Otherwise { Text.From(Value.Error(”Error occurred”)) }`