<?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: Displaying the run-time error's line number in VB.NET in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/displaying-the-run-time-error-s-line-number-in-vb/m-p/16923#M375</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the answer to my own question: ex.ToString where ex is the exception object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Public Class Form1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim x As Integer = 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim y As Integer = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim result As Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; result = x / y&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Catch ex As Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; MessageBox.Show("ex.ToString: " &amp;amp; ex.ToString)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps others.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Sep 2010 12:20:20 GMT</pubDate>
    <dc:creator>MeToo</dc:creator>
    <dc:date>2010-09-14T12:20:20Z</dc:date>
    <item>
      <title>Displaying the run-time error's line number in VB.NET</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/displaying-the-run-time-error-s-line-number-in-vb/m-p/16922#M374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am porting a large VB6 ArcGIS Desktop application to VB.NET and AO Add-In. The latter is new to me. I really liked the errorhandler module that came with the VB6 SDK that reported the run-time error's line number. What's the equivalent in VB.NET? I don't see that option with the Try... Catch... Finally statement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 11:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/displaying-the-run-time-error-s-line-number-in-vb/m-p/16922#M374</guid>
      <dc:creator>MeToo</dc:creator>
      <dc:date>2010-09-14T11:51:12Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying the run-time error's line number in VB.NET</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/displaying-the-run-time-error-s-line-number-in-vb/m-p/16923#M375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the answer to my own question: ex.ToString where ex is the exception object.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Public Class Form1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim x As Integer = 5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim y As Integer = 0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Dim result As Integer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; result = x / y&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Catch ex As Exception&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; MessageBox.Show("ex.ToString: " &amp;amp; ex.ToString)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Class&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps others.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Sep 2010 12:20:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/displaying-the-run-time-error-s-line-number-in-vb/m-p/16923#M375</guid>
      <dc:creator>MeToo</dc:creator>
      <dc:date>2010-09-14T12:20:20Z</dc:date>
    </item>
  </channel>
</rss>

