<?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[try, catch Problem]]></title><description><![CDATA[<p>Hallo,<br />
ich habe noch nie mit try und cach gearbeitet. Jetzt habe ich mich da ein bisschen eingelesen und versucht, aber bei mir klappt das einfach nicht. Evtl könnt ihr mir ja sagen wie das geht...</p>
<p>Hier mal mein Quelltext:</p>
<pre><code>#include &lt;complex&gt;
...
using namespace std;
typedef complex&lt;double&gt; comp;
.
.
.
try{
a-&gt;set_Y(       comp(edt_11r-&gt;Text.ToDouble(),edt_11i-&gt;Text.ToDouble()),
                                                        comp(edt_12r-&gt;Text.ToDouble(),edt_12i-&gt;Text.ToDouble()),
                                                        comp(edt_21r-&gt;Text.ToDouble(),edt_21i-&gt;Text.ToDouble()),
                                                        comp(edt_22r-&gt;Text.ToDouble(),edt_22i-&gt;Text.ToDouble()));
                                        if(a-&gt;berechne_A(a-&gt;get_Y(),0))
                                                ba = true;
                                        if(a-&gt;berechne_Z(a-&gt;get_Y(),0))
                                                bz = true;
                                        if(a-&gt;berechne_h(a-&gt;get_Y(),0))
                                                bh = true;
                                        by = true;
                                        }
                                        catch(...)
                                        {
                                                MessageBox(NULL,&quot;Die Eingaben sind nicht korrekt.\nVielleicht haben Sie ein \&quot;.\&quot; anstatt ein \&quot;,\&quot; eingegeben, oder keine gültige Zahl.&quot;,
                                                                &quot;Falsche Eingabe...&quot;,MB_OK);
                                        }
</code></pre>
<p>Ich bekomme aber wenn ich ein . anstatt ein , eingeben immer eine Exception vom Typ TConvertError. Diese wird aber von dem catch(...)-Block icht abgefngen. Warum??? Was muss ich denn in die Klammern hinter catch schreiben, dass nur diese eine Exception abgefangen wird.</p>
<p>MfG<br />
Muecke</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/167728/try-catch-problem</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 05:53:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/167728.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 14 Dec 2006 12:21:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to try, catch Problem on Thu, 14 Dec 2006 12:21:14 GMT]]></title><description><![CDATA[<p>Hallo,<br />
ich habe noch nie mit try und cach gearbeitet. Jetzt habe ich mich da ein bisschen eingelesen und versucht, aber bei mir klappt das einfach nicht. Evtl könnt ihr mir ja sagen wie das geht...</p>
<p>Hier mal mein Quelltext:</p>
<pre><code>#include &lt;complex&gt;
...
using namespace std;
typedef complex&lt;double&gt; comp;
.
.
.
try{
a-&gt;set_Y(       comp(edt_11r-&gt;Text.ToDouble(),edt_11i-&gt;Text.ToDouble()),
                                                        comp(edt_12r-&gt;Text.ToDouble(),edt_12i-&gt;Text.ToDouble()),
                                                        comp(edt_21r-&gt;Text.ToDouble(),edt_21i-&gt;Text.ToDouble()),
                                                        comp(edt_22r-&gt;Text.ToDouble(),edt_22i-&gt;Text.ToDouble()));
                                        if(a-&gt;berechne_A(a-&gt;get_Y(),0))
                                                ba = true;
                                        if(a-&gt;berechne_Z(a-&gt;get_Y(),0))
                                                bz = true;
                                        if(a-&gt;berechne_h(a-&gt;get_Y(),0))
                                                bh = true;
                                        by = true;
                                        }
                                        catch(...)
                                        {
                                                MessageBox(NULL,&quot;Die Eingaben sind nicht korrekt.\nVielleicht haben Sie ein \&quot;.\&quot; anstatt ein \&quot;,\&quot; eingegeben, oder keine gültige Zahl.&quot;,
                                                                &quot;Falsche Eingabe...&quot;,MB_OK);
                                        }
</code></pre>
<p>Ich bekomme aber wenn ich ein . anstatt ein , eingeben immer eine Exception vom Typ TConvertError. Diese wird aber von dem catch(...)-Block icht abgefngen. Warum??? Was muss ich denn in die Klammern hinter catch schreiben, dass nur diese eine Exception abgefangen wird.</p>
<p>MfG<br />
Muecke</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191700</guid><dc:creator><![CDATA[Muecke]]></dc:creator><pubDate>Thu, 14 Dec 2006 12:21:14 GMT</pubDate></item><item><title><![CDATA[Reply to try, catch Problem on Thu, 14 Dec 2006 12:27:14 GMT]]></title><description><![CDATA[<p>Beim Start aus der IDE heraus wird die Exception trotzdem angezeigt, das kann in den Debugger-Optionen ein- bzw. abgestellt werden.<br />
Beim Start ausserhalb der IDE wird die Exception planmässig abgefangen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191705</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 14 Dec 2006 12:27:14 GMT</pubDate></item><item><title><![CDATA[Reply to try, catch Problem on Thu, 14 Dec 2006 12:31:55 GMT]]></title><description><![CDATA[<p>Danke. Du hast recht.<br />
Wie stelle ich das denn in den Optionen um?<br />
Und was muss ich bei catch() in die Klammern schreiben, dass der nur exceptions vom Typ TConvertError abfängt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191709</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191709</guid><dc:creator><![CDATA[Muecke]]></dc:creator><pubDate>Thu, 14 Dec 2006 12:31:55 GMT</pubDate></item><item><title><![CDATA[Reply to try, catch Problem on Thu, 14 Dec 2006 12:37:28 GMT]]></title><description><![CDATA[<p><a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-39264.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-39264.html</a></p>
<p>Und im Debugger-Optionsdialog einfach mal den Hilfe-Button anklicken.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1191711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1191711</guid><dc:creator><![CDATA[Jansen]]></dc:creator><pubDate>Thu, 14 Dec 2006 12:37:28 GMT</pubDate></item></channel></rss>