<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Exceptionhandling fuer math.h]]></title><description><![CDATA[<p>Hallo,<br />
ich hoffe mir kann jemand bei diesem Problem helfen.<br />
Ich arbeite mit dem B-Builder 6.0 unter WinXP.</p>
<p>Laut meiner Literatur ist es unter C++ nicht möglich eine Exception aufzurufen, falls in einer Standardbiblio. von ANSI-C ein Fehler auftritt.<br />
Mich interessiert hier genauer die math.h.</p>
<p>Die genannte Literatur:C++ mit dem Borland Builder von R.Kaiser</p>
<p>Da steht zwar, dass ich die Funktion:</p>
<pre><code class="language-cpp">int _RTLENTRY  _matherr(struct _exception  *e)
</code></pre>
<p>durch eine eigene ersetzen kann und somit das Exceptionhandling für diesenFall möglich wird.<br />
Nur leider bekomme ich den Fehler:&quot;Fehler in der Deklarationssyntax!&quot;<br />
Die ursprüngliche Deklaration in der Math.h habe ich gefunden und übernommen:</p>
<pre><code class="language-cpp">int _RTLENTRY  _matherr(struct _exception  *__e)
</code></pre>
<p>bekomme aber selbige Fehlermeldung.<br />
Ziel der Sache ist es Bereichsüberschreitungen u.a. der Funktionen pow(double, double) und sqrt(double) abzufangen.</p>
<p>Vielen Dank für eure Hilfe.</p>
<p>DerHorst</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/197747/exceptionhandling-fuer-math-h</link><generator>RSS for Node</generator><lastBuildDate>Thu, 01 Oct 2026 13:19:12 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/197747.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 14 Nov 2007 12:13:43 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 12:13:43 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich hoffe mir kann jemand bei diesem Problem helfen.<br />
Ich arbeite mit dem B-Builder 6.0 unter WinXP.</p>
<p>Laut meiner Literatur ist es unter C++ nicht möglich eine Exception aufzurufen, falls in einer Standardbiblio. von ANSI-C ein Fehler auftritt.<br />
Mich interessiert hier genauer die math.h.</p>
<p>Die genannte Literatur:C++ mit dem Borland Builder von R.Kaiser</p>
<p>Da steht zwar, dass ich die Funktion:</p>
<pre><code class="language-cpp">int _RTLENTRY  _matherr(struct _exception  *e)
</code></pre>
<p>durch eine eigene ersetzen kann und somit das Exceptionhandling für diesenFall möglich wird.<br />
Nur leider bekomme ich den Fehler:&quot;Fehler in der Deklarationssyntax!&quot;<br />
Die ursprüngliche Deklaration in der Math.h habe ich gefunden und übernommen:</p>
<pre><code class="language-cpp">int _RTLENTRY  _matherr(struct _exception  *__e)
</code></pre>
<p>bekomme aber selbige Fehlermeldung.<br />
Ziel der Sache ist es Bereichsüberschreitungen u.a. der Funktionen pow(double, double) und sqrt(double) abzufangen.</p>
<p>Vielen Dank für eure Hilfe.</p>
<p>DerHorst</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403014</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403014</guid><dc:creator><![CDATA[DerHorst]]></dc:creator><pubDate>Wed, 14 Nov 2007 12:13:43 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 12:34:38 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Ich glaube nicht das dieses Problem BCB-spezifisch ist. Ich verschiebe dich mal ins C++ Forum.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403028</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403028</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 14 Nov 2007 12:34:38 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 12:34:48 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile-var-mode-is-viewprofile-and-u-is-14774.html" rel="nofollow">akari</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-2.html" rel="nofollow">VCL (C++ Builder)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum-var-f-is-15.html" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39405.html" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403030</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403030</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Wed, 14 Nov 2007 12:34:48 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 12:53:34 GMT]]></title><description><![CDATA[<p>Ich denke das ist schon BCB-spezifisch. In der BCB6-Hilfe zu _matherr steht doch alles Notwendige. Die korrekte Signatur für _matherr ist</p>
<pre><code class="language-cpp">int _matherr(struct _exception *e);
</code></pre>
<p>In der Hilfe gibt es sogar ein Beispiel.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403043</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403043</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 14 Nov 2007 12:53:34 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 13:09:18 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/1387">@Braunstein</a>: Danke für den Tip!<br />
Da ich immer unter RTL...dingens gesucht habe, habe ich in der Hilfe nix gefunden.<br />
Jetzt tut sich aber ein anderes Problem auf.</p>
<p>Angeblich ist type kein Element von Exception, obwohl in der math.h:</p>
<pre><code class="language-cpp">struct  _exception
{
    int type;
    char   _FAR *name;
    double  arg1, arg2, retval;
};
</code></pre>
<p>Meine matherr-Funktion sieht folgendermaßen aus:</p>
<pre><code class="language-cpp">int _matherr (struct _exception *e)
{
if (e-&gt;type == TLOSS)
    {
    //Das gelieferte Ergebnis ist bedeutunglos:
    throw EMathError(&quot;TLOSS - Ergebnis Bedeutungslos: &quot;
                    +AnsiString(e-&gt;name)
                    +&quot;(&quot;+FloatToStr(e-&gt;arg1)+&quot;,&quot;
                    +&quot;(&quot;+FloatToStr(e-&gt;arg2)+&quot;)&quot;);
    }
else if ...
}
</code></pre>
<p>Das kann ich mir nicht erklären <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403049</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403049</guid><dc:creator><![CDATA[DerHorst]]></dc:creator><pubDate>Wed, 14 Nov 2007 13:09:18 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 13:52:19 GMT]]></title><description><![CDATA[<p>Ich auch nicht. Bei mir funktioniert deine Funktion problemlos.<br />
Das _FAR muss bei der Deklaration übrigens weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403083</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 14 Nov 2007 13:52:19 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 14:02:37 GMT]]></title><description><![CDATA[<p>versuch mal selber einen datentyp exception zu bauen. Der compiler sollte sich darauf eigentlich beschweren und dir zeigen wo exception schon definiert wurde. Vielleicht wird deine angenommene Definition durch ein #ifdef verdeckt etc.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403095</guid><dc:creator><![CDATA[Maxi]]></dc:creator><pubDate>Wed, 14 Nov 2007 14:02:37 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Wed, 14 Nov 2007 17:04:16 GMT]]></title><description><![CDATA[<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Es funktioniert nur, wenn die math.h auch in dieser Datei includiert wird.<br />
Ich hatte die math.h vorher nur in meiner &quot;myinclude.h&quot; und diese dann in die Datei mit der neuen Exception-Funktion eingebunden. Das funtioniert nicht.</p>
<p>Ist das ein Denkfehler von mir:<br />
Oft benötigte Header in einer &quot;myinclude.h&quot; datei includieren und dann nur noch diese in die entsprechenden Dateien einbinden? Ich dachte immer das funzt !<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Trotzdem Dank euch allen!</p>
<p>DerHorst</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403229</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403229</guid><dc:creator><![CDATA[DerHorst]]></dc:creator><pubDate>Wed, 14 Nov 2007 17:04:16 GMT</pubDate></item><item><title><![CDATA[Reply to Exceptionhandling fuer math.h on Thu, 15 Nov 2007 08:51:48 GMT]]></title><description><![CDATA[<p>Das mit der myinclude soltte auch so gehen. Das ist aber meiner Meinung nach eine eher schlechte Idee. Man sollte nur das include was man wirklich braucht, sonst verlängern sich die Compilezeiten ganz schön. Header die man öfters benötigt, und die sich nie ändern kann man als precompiled header (oberhalb von #pragma hdrstop) reinziehen.<br />
<a href="http://web.archive.org/web/20031207214613/bcbdev.com/articles/pch.htm" rel="nofollow">http://web.archive.org/web/20031207214613/bcbdev.com/articles/pch.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1403480</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1403480</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Thu, 15 Nov 2007 08:51:48 GMT</pubDate></item></channel></rss>