<?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: How to catch exceptions in RealDWG? in ObjectARX Forum</title>
    <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773647#M12764</link>
    <description>&lt;P&gt;It seems that SEH __try and __except can catch the exceptions, but cause a lot of compiler warnings and errors until I use a compiler option to disable them. I am try to find solution for it.&lt;/P&gt;</description>
    <pubDate>Fri, 24 Jan 2014 23:13:08 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-24T23:13:08Z</dc:date>
    <item>
      <title>How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771179#M12751</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When calling some functions in RealDWG, such as convertToPolyType(), I will get an exception called “Floating-point stack check”. I use C++ try-catch, but cannot catch the exception:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (p3DLine-&amp;gt; convertToPolyType(xxxx) != Acad::eOk)&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp;&amp;nbsp; FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Catch(…)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cannot catch the “Floating-point stack check” exception.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a mechanism in RealDWG or ObjectARX that can help to process the exceptions raised when calling functions in these two libraries?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2014 20:57:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771179#M12751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-23T20:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771291#M12752</link>
      <description>&lt;P&gt;How do you propose to recover from such an exception? I think the only way to "process" it is to prevent it from happening in the first place by validating your data before you call the function.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2014 21:30:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771291#M12752</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-23T21:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771521#M12753</link>
      <description>&lt;P&gt;For ObjectARX there is the acedDisableDefaultARXExceptionHandler() function which turns off the automatic handler that deals with excpetions thrown while code is executing in an arx or dbx module.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2014 23:52:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771521#M12753</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2014-01-23T23:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771621#M12754</link>
      <description>&lt;P&gt;How to validate the data before passing it to the function? I do not notice there are such functions.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 01:16:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771621#M12754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T01:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771623#M12755</link>
      <description>&lt;P&gt;Can I write my own code that handle the exceptions, instead of just disable all the exceptions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if the exceptions are disabled, then if an error occurs, then what will happen?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 01:18:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771623#M12755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T01:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771815#M12756</link>
      <description>&lt;P&gt;There is no magic function to validate your data. You would need to determine through testing what&amp;nbsp;triggers the exception, then add code to detect that situation and abort your operation before the exception occurs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;How to validate the data before passing it to the function? I do not notice there are such functions.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 05:46:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771815#M12756</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-24T05:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771817#M12757</link>
      <description>&lt;P&gt;Of course you can write your own code to handle an exception, but it is pointless to do so if you don't know &lt;EM&gt;how&lt;/EM&gt; to recover without leaving corrupted state in memory. Unfortunately you're probably not going to be able to safely recover from this one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;@Anonymous wrote:&lt;BR /&gt;&lt;P&gt;Can I write my own code that handle the exceptions, instead of just disable all the exceptions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And if the exceptions are disabled, then if an error occurs, then what will happen?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 05:51:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4771817#M12757</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-24T05:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4772683#M12758</link>
      <description>&lt;P&gt;Does the function acedDisableDefaultARXExceptionHandler() exists in RealDWG as well?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to read the ObjectARX documents and add&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include "aced.h"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but compiler said the header file does not exist.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try to search all the source files under RealDWG 2014\Inc folder but cannot find this function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I think the way to call this function is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;acedDisableDefaultARXExceptionHandler(Adesk::kTrue);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;is that correct?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 15:51:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4772683#M12758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T15:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773023#M12759</link>
      <description>&lt;P&gt;acedDisableDefaultARXExcedptionHandler() is Acad specific.&amp;nbsp; RealDWG doesn't have a default exception handler - that would be the responsibility of the host application.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that Owen's suggestion is your best bet - figure out what's triggering the exception and try to prevent that from happening.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 17:39:04 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773023#M12759</guid>
      <dc:creator>artc2</dc:creator>
      <dc:date>2014-01-24T17:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773105#M12760</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/656250"&gt;@artc2&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;acedDisableDefaultARXExcedptionHandler() is Acad specific.&amp;nbsp; RealDWG doesn't have a default exception handler - that would be the responsibility of the host application.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think that Owen's suggestion is your best bet - figure out what's triggering the exception and try to prevent that from happening.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;That is a bit contradictory, since it is the responsibility of the host application, why my try-catch codes cannot catch the exceptions?&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 18:13:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773105#M12760</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T18:13:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773161#M12761</link>
      <description>&lt;P&gt;You haven't provided complete information&amp;nbsp;about the original exception. Is it a C or C++ exception? Have you enabled C++ exception handling in your compiler settings? If it is a C exception, you&amp;nbsp;may need to&amp;nbsp;implement an SEH (Structured Exception Handler) to handle it. However as stated before, this is&amp;nbsp;all academic&amp;nbsp;if you can't actually&amp;nbsp;safely recover from&amp;nbsp;the exception.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 18:42:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773161#M12761</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-24T18:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773247#M12762</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/36306"&gt;@owenwengerd&lt;/a&gt; wrote:&lt;BR /&gt;&lt;P&gt;You haven't provided complete information&amp;nbsp;about the original exception. Is it a C or C++ exception? Have you enabled C++ exception handling in your compiler settings? If it is a C exception, you&amp;nbsp;may need to&amp;nbsp;implement an SEH (Structured Exception Handler) to handle it. However as stated before, this is&amp;nbsp;all academic&amp;nbsp;if you can't actually&amp;nbsp;safely recover from&amp;nbsp;the exception.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The original exception is occurs when I invoke p3DLine-&amp;gt; convertToPolyType(xxxx), as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;try&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (p3DLine-&amp;gt; convertToPolyType(xxxx) != Acad::eOk)&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp;&amp;nbsp; FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; …&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;Catch(…)&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cannot catch the “Floating-point stack check” exception.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Visual C++ 2010 Debug version, when trace to the codeline:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If (p3DLine-&amp;gt; convertToPolyType(xxxx) != Acad::eOk)&amp;nbsp;&amp;nbsp;&amp;nbsp; return&amp;nbsp;&amp;nbsp; FALSE;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I will see endless exception report in the output window, like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;First-chance exception at 0x0076de70 in GSFR.exe: 0xC0000092: Floating-point stack check.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I enable the "Exceptions -&amp;gt; Win32 Exceptions -&amp;gt; c0000092: Floating-point stack check" option under "Debug" menu, then Visual C++ will stop at the first exception. But my try-catch code still cannot catch it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I need to catch the exception under release version as well, so cannot rely on the exception settings for "Debug version" only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your helps.!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 19:15:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773247#M12762</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T19:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773371#M12763</link>
      <description>&lt;P&gt;Moreover, the vertexes of the polylines are inputted by user randomly so it is very difficult to check or validate the vertex values before calling&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;p3DLine-&amp;gt; convertToPolyType()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Therefore, I want to catch the exception raised from this function so that to prompt the user about the invalid input of the vertex values.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 20:21:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773371#M12763</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T20:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773647#M12764</link>
      <description>&lt;P&gt;It seems that SEH __try and __except can catch the exceptions, but cause a lot of compiler warnings and errors until I use a compiler option to disable them. I am try to find solution for it.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jan 2014 23:13:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773647#M12764</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-24T23:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to catch exceptions in RealDWG?</title>
      <link>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773785#M12765</link>
      <description>&lt;P&gt;I see. I hope you are not planning to distribute&amp;nbsp;your application to others. That would be very unfortunate.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jan 2014 04:09:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/objectarx-forum/how-to-catch-exceptions-in-realdwg/m-p/4773785#M12765</guid>
      <dc:creator>owenwengerd</dc:creator>
      <dc:date>2014-01-25T04:09:39Z</dc:date>
    </item>
  </channel>
</rss>

