<?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[Zeile in Fehlermeldung ausgeben]]></title><description><![CDATA[<p>Hallo,</p>
<p>gibt es eine Möglichkeit die Nummer der Zeile auszugeben, in der ein Fehler auftritt.</p>
<p>z.B.</p>
<pre><code>try{
  // code
  // code
  // code
  // code  hier tritt der Fehler auf
  // code
  // code
  // code
  // code
}catch(Exception &amp;exception){
  &amp;exception.Message = &amp;exception.Message + &quot;ZEILENNUMMER ANHÄNGEN&quot;
  Application-&gt;ShowException(&amp;exception);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/97475/zeile-in-fehlermeldung-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Jul 2026 15:07:53 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/97475.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 11 Jan 2005 10:37:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Tue, 11 Jan 2005 10:37:59 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>gibt es eine Möglichkeit die Nummer der Zeile auszugeben, in der ein Fehler auftritt.</p>
<p>z.B.</p>
<pre><code>try{
  // code
  // code
  // code
  // code  hier tritt der Fehler auf
  // code
  // code
  // code
  // code
}catch(Exception &amp;exception){
  &amp;exception.Message = &amp;exception.Message + &quot;ZEILENNUMMER ANHÄNGEN&quot;
  Application-&gt;ShowException(&amp;exception);
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/693058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/693058</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Tue, 11 Jan 2005 10:37:59 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Tue, 11 Jan 2005 10:41:22 GMT]]></title><description><![CDATA[<p>Such mal in der BCB-Hilfe nach __ThrowLineNumber().</p>
<p>Gruß,</p>
<p>Alexander</p>
]]></description><link>https://www.c-plusplus.net/forum/post/693063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/693063</guid><dc:creator><![CDATA[Alexander Kempf]]></dc:creator><pubDate>Tue, 11 Jan 2005 10:41:22 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Tue, 11 Jan 2005 10:59:14 GMT]]></title><description><![CDATA[<p>Vielen vielen vielen Dank <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="🙂"
    /></p>
<p>Alexander Kempf schrieb:</p>
<blockquote>
<p>Such mal in der BCB-Hilfe nach __ThrowLineNumber().</p>
<p>Gruß,</p>
<p>Alexander</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/693085</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/693085</guid><dc:creator><![CDATA[IcemanX]]></dc:creator><pubDate>Tue, 11 Jan 2005 10:59:14 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Wed, 22 Jun 2005 20:20:03 GMT]]></title><description><![CDATA[<p>Hi,<br />
ich wärme diesen Thread mal auf, weil ich ebenfalls an diesem Punkt bin wo dieser Thread aufhört.</p>
<p>Mein Problem ist allerdings das bei mir immer eine leere Zeile steht.</p>
<p>Ich habe die Except.h includiert und ich habe auch in der Options Quelle den Parameter -xp angefügt. So wie es in der BCB hiplfe beschrieben steht aber wieso funzt das ganze bei mir nicht.</p>
<pre><code class="language-cpp">try
        {
            if(isdigit(svrList-&gt;Values[&quot;numplayers&quot;].operator[] (1)) &amp;&amp; isdigit(svrList-&gt;Values[&quot;maxplayers&quot;].operator[] (1)))
            {
                iSpOnl =    svrList-&gt;Values[&quot;numplayers&quot;].ToInt();
                iSpMax =    svrList-&gt;Values[&quot;maxplayers&quot;].ToInt();
            }

            iSpielerOnline  +=  iSpOnl &lt; 0 ? 0 : iSpOnl &gt; 128 ? 0 : iSpOnl;
            iSpielerMax     +=  iSpMax &lt; 0 ? 0 : iSpMax &gt; 128 ? 0 : iSpMax;
        }
        catch( Exception &amp;e )
        {
            ShowMessage(  e.Message + &quot;\n\n&quot;
                  + &quot;An exception of type &quot; + __ThrowExceptionName()
                  + &quot;\nwas thrown by line &quot; + AnsiString(__ThrowLineNumber())

                  + &quot;\nof file &quot; + __ThrowFileName() );
        }
</code></pre>
<p>Der Code stammt aus dem Beispiel in der Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/815102</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/815102</guid><dc:creator><![CDATA[Fox-Alpha]]></dc:creator><pubDate>Wed, 22 Jun 2005 20:20:03 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Fri, 12 Aug 2005 06:46:57 GMT]]></title><description><![CDATA[<p>ich hab' das gleiche Ploblem.</p>
<p>Wenn ich eine Exception provoziere, z.B. mit a = StrToInt(&quot;Hallo&quot;),<br />
ist die Zeilennummer und das File leer.</p>
<p>Wenn ich aber eine Exception mit throw Exception(&quot;Hallole&quot;) auslöse,<br />
funktioniert's. Aber das ist ja nicht sinn der Sache !!! <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
<p>Michael</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850531</guid><dc:creator><![CDATA[Trony]]></dc:creator><pubDate>Fri, 12 Aug 2005 06:46:57 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Fri, 12 Aug 2005 08:50:27 GMT]]></title><description><![CDATA[<p>Bei einer Exception aus einem Package (z.B. bei der Funktion StrToInt) kann er ja gar nicht die Zeilennummer des Exceptionwerfens zurückgeben, da die Packages ja nicht mit der entsprechenden Kommandozeilenoption gebaut wurden.<br />
Außerdem würde es euch nicht viel nützen, wenn dann dort steht:<br />
'Sysutils.pas' in Line '524' ...</p>
<p>Also nur für Exceptions, dir ihr in eurem Programm verwendet, ist __ThrowLineNumber() und __ThrowFileName() bekannt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850608</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850608</guid><dc:creator><![CDATA[Th]]></dc:creator><pubDate>Fri, 12 Aug 2005 08:50:27 GMT</pubDate></item><item><title><![CDATA[Reply to Zeile in Fehlermeldung ausgeben on Fri, 12 Aug 2005 09:10:39 GMT]]></title><description><![CDATA[<p>Hallo Th,</p>
<p>na klar, kann ja nicht...</p>
<p>Danke für deine Antwort</p>
]]></description><link>https://www.c-plusplus.net/forum/post/850629</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/850629</guid><dc:creator><![CDATA[Trony]]></dc:creator><pubDate>Fri, 12 Aug 2005 09:10:39 GMT</pubDate></item></channel></rss>