<?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 Handling .NET Errors in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/437069#M213955</link>
    <description>&lt;DIV&gt;I want to implement a .NET server (in C#) that will be used by LabVIEW.&amp;nbsp; LabVIEW has property nodes and invoke nodes that can access the properties and methods of my class.&amp;nbsp; What is the mechanism by which I return error information to LabVIEW, such that it appears at the "error out" of an invoke node or property node?&amp;nbsp; If I throw an exception, will LabVIEW catch it an handle it?&lt;/DIV&gt;</description>
    <pubDate>Mon, 06 Nov 2006 15:41:16 GMT</pubDate>
    <dc:creator>qstephenson</dc:creator>
    <dc:date>2006-11-06T15:41:16Z</dc:date>
    <item>
      <title>Handling .NET Errors</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/437069#M213955</link>
      <description>&lt;DIV&gt;I want to implement a .NET server (in C#) that will be used by LabVIEW.&amp;nbsp; LabVIEW has property nodes and invoke nodes that can access the properties and methods of my class.&amp;nbsp; What is the mechanism by which I return error information to LabVIEW, such that it appears at the "error out" of an invoke node or property node?&amp;nbsp; If I throw an exception, will LabVIEW catch it an handle it?&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Nov 2006 15:41:16 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/437069#M213955</guid>
      <dc:creator>qstephenson</dc:creator>
      <dc:date>2006-11-06T15:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Handling .NET Errors</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/437834#M214240</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Handling errors is easy and hard, depending on how much information you want at runtime. Any exception thrown in a call to a property or method is converted into a LV error w/ error code 1172. The information on the exception is then put into the error text, which is okay for humans to read, but I don't recommend writing code to try to parse it (at a minimum, we don't say that the format may not change in the future). Unfortunately, there isn't a way to get the exception object currently.&lt;/P&gt;
&lt;P&gt;Therefore, you might want to think about saving off the exception object yourself (wrap your methods w/ a try/catch and a rethrow in the catch) in the object instance and expose it as a property. Thus you can access it via code at runtime for error handling cases. This, of course, assumes the server is either single threaded, or you'll use TLS (thread local storage)&amp;nbsp;to store off the exception for the last method invoked.&lt;/P&gt;
&lt;P&gt;Anyway, those are some initial thoughts on the matter. Feel free to reply w/ comments or questions.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2006 18:21:26 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/437834#M214240</guid>
      <dc:creator>Lycangeek</dc:creator>
      <dc:date>2006-11-07T18:21:26Z</dc:date>
    </item>
    <item>
      <title>Re: Handling .NET Errors</title>
      <link>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/3721760#M1047661</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I look at this thread which is from 2006. It says that there is no way to get information about .NET exception, except that parsing the text error.&lt;/P&gt;
&lt;P&gt;Nowadays, Is there a way to get information about a .NET exception, for exemple a code, the name of&amp;nbsp; the exception ...&lt;/P&gt;
&lt;P&gt;I use an assemby and I can't modify the code of this assemby&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Laurent&lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 14:18:15 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/Handling-NET-Errors/m-p/3721760#M1047661</guid>
      <dc:creator>Laurent_B</dc:creator>
      <dc:date>2017-11-24T14:18:15Z</dc:date>
    </item>
  </channel>
</rss>

