File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed
powerquery-docs/samples/TripPin/7-AdvancedSchema Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ author: ptyx507x
5
5
6
6
7
7
ms.topic : tutorial
8
- ms.date : 5/15/2020
8
+ ms.date : 11/12/2022
9
9
ms.author : miescobar
10
10
---
11
11
@@ -248,12 +248,20 @@ At this point, your extension almost has as much "common" code as TripPin connec
248
248
The code to do this is included in the snippet below:
249
249
250
250
```
251
- Extension.LoadFunction = (name as text) =>
252
- let
253
- binary = Extension.Contents(name),
254
- asText = Text.FromBinary(binary)
255
- in
256
- Expression.Evaluate(asText, #shared);
251
+ Extension.LoadFunction = (fileName as text) =>
252
+ let
253
+ binary = Extension.Contents(fileName),
254
+ asText = Text.FromBinary(binary)
255
+ in
256
+ try
257
+ Expression.Evaluate(asText, #shared)
258
+ catch (e) =>
259
+ error [
260
+ Reason = "Extension.LoadFunction Failure",
261
+ Message.Format = "Loading '#{0}' failed - '#{1}': '#{2}'",
262
+ Message.Parameters = {fileName, e[Reason], e[Message]},
263
+ Detail = [File = fileName, Error = e]
264
+ ];
257
265
258
266
Table.ChangeType = Extension.LoadFunction("Table.ChangeType.pqm");
259
267
Table.GenerateByPage = Extension.LoadFunction("Table.GenerateByPage.pqm");
You can’t perform that action at this time.
0 commit comments