Skip to content

Commit ce06fc7

Browse files
authoredNov 22, 2022
Merge pull request #723 from MicrosoftDocs/repo_sync_working_branch
Confirm merge from repo_sync_working_branch to main to sync with https://github.com/MicrosoftDocs/powerquery-docs (branch main)
2 parents 0b67448 + 4bd7a4f commit ce06fc7

File tree

1 file changed

+15
-7
lines changed
  • powerquery-docs/samples/TripPin/7-AdvancedSchema

1 file changed

+15
-7
lines changed
 

‎powerquery-docs/samples/TripPin/7-AdvancedSchema/README.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: ptyx507x
55

66

77
ms.topic: tutorial
8-
ms.date: 5/15/2020
8+
ms.date: 11/12/2022
99
ms.author: miescobar
1010
---
1111

@@ -248,12 +248,20 @@ At this point, your extension almost has as much "common" code as TripPin connec
248248
The code to do this is included in the snippet below:
249249

250250
```
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+
];
257265
258266
Table.ChangeType = Extension.LoadFunction("Table.ChangeType.pqm");
259267
Table.GenerateByPage = Extension.LoadFunction("Table.GenerateByPage.pqm");

0 commit comments

Comments
 (0)
Please sign in to comment.