<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Error Handling in M in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Error-Handling-in-M/m-p/211042#M6660</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22037"&gt;@Stharwani&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am building a Custom Connector to get data from a web sevrice. There are instances where the data would be null. Is tehre any error handling mechanism where it if it runs into an error, it can skip it and move on. Like Try catch?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22037"&gt;@Stharwani&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I'm not a M master, but based on my test, there's some error handling mechanism in M, at least the "try" word works some way. The M code below processes to last step though there's error&amp;nbsp;midway.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlSK1YlWSgKTyUqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    //change the type of an non-existing column
    #"Changed Type1" = try Table.TransformColumnTypes(#"Changed Type",{{"addAnewCol", Int64.Type}}),
    #"Final result" = #"Changed Type"
in
    #"Final result"&lt;/PRE&gt;
&lt;P&gt;Could you be more specifc on your scenario, what kind of web service? I think you might add a check null step.&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2017 07:05:59 GMT</pubDate>
    <dc:creator>Eric_Zhang</dc:creator>
    <dc:date>2017-07-13T07:05:59Z</dc:date>
    <item>
      <title>Error Handling in M</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-Handling-in-M/m-p/210271#M6641</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am building a Custom Connector to get data from a web sevrice. There are instances where the data would be null. Is tehre any error handling mechanism where it if it runs into an error, it can skip it and move on. Like Try catch?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 07:43:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-Handling-in-M/m-p/210271#M6641</guid>
      <dc:creator>Stharwani</dc:creator>
      <dc:date>2017-07-12T07:43:06Z</dc:date>
    </item>
    <item>
      <title>Re: Error Handling in M</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Error-Handling-in-M/m-p/211042#M6660</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22037"&gt;@Stharwani&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am building a Custom Connector to get data from a web sevrice. There are instances where the data would be null. Is tehre any error handling mechanism where it if it runs into an error, it can skip it and move on. Like Try catch?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/22037"&gt;@Stharwani&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;I'm not a M master, but based on my test, there's some error handling mechanism in M, at least the "try" word works some way. The M code below processes to last step though there's error&amp;nbsp;midway.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlSK1YlWSgKTyUqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Column1 = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}}),
    //change the type of an non-existing column
    #"Changed Type1" = try Table.TransformColumnTypes(#"Changed Type",{{"addAnewCol", Int64.Type}}),
    #"Final result" = #"Changed Type"
in
    #"Final result"&lt;/PRE&gt;
&lt;P&gt;Could you be more specifc on your scenario, what kind of web service? I think you might add a check null step.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 07:05:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Error-Handling-in-M/m-p/211042#M6660</guid>
      <dc:creator>Eric_Zhang</dc:creator>
      <dc:date>2017-07-13T07:05:59Z</dc:date>
    </item>
  </channel>
</rss>

