<?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[Frage zu Try Catch und Exeptions]]></title><description><![CDATA[<p>Hallo alle zusammen,</p>
<p>Folgender Code:</p>
<pre><code class="language-cpp">Rechnung toread;
 try
        {
          fstream file(rechnrtodatname(rechnr), ios::in|ios::binary);
          if(file.is_open())
                file.write((const char*)&amp;toread,sizeof(toread));
          if(file.bad())
                return(toread);//Wenn ich hier ankomme soll er eine Execption auslösen

        }
 catch(...)
        {
          //Hier kommt dann ein Std error mit Msg Box
        }
</code></pre>
<p>Macht mir sorgen.<br />
Ich würde gerne selbst eine Execption auslösen um in den Catch Block zu kommen.<br />
Wie mache ich das??</p>
<p>Wenn jemand ne gute Seite zu Execptions her damit <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>
]]></description><link>https://www.c-plusplus.net/forum/topic/157660/frage-zu-try-catch-und-exeptions</link><generator>RSS for Node</generator><lastBuildDate>Mon, 10 Aug 2026 11:43:50 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157660.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Aug 2006 12:11:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Frage zu Try Catch und Exeptions on Mon, 28 Aug 2006 12:12:25 GMT]]></title><description><![CDATA[<p>Hallo alle zusammen,</p>
<p>Folgender Code:</p>
<pre><code class="language-cpp">Rechnung toread;
 try
        {
          fstream file(rechnrtodatname(rechnr), ios::in|ios::binary);
          if(file.is_open())
                file.write((const char*)&amp;toread,sizeof(toread));
          if(file.bad())
                return(toread);//Wenn ich hier ankomme soll er eine Execption auslösen

        }
 catch(...)
        {
          //Hier kommt dann ein Std error mit Msg Box
        }
</code></pre>
<p>Macht mir sorgen.<br />
Ich würde gerne selbst eine Execption auslösen um in den Catch Block zu kommen.<br />
Wie mache ich das??</p>
<p>Wenn jemand ne gute Seite zu Execptions her damit <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>
]]></description><link>https://www.c-plusplus.net/forum/post/1126086</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126086</guid><dc:creator><![CDATA[Croatiancow]]></dc:creator><pubDate>Mon, 28 Aug 2006 12:12:25 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Try Catch und Exeptions on Mon, 28 Aug 2006 12:15:36 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Exceptions löst man mit throw aus. Schau einfach mal in die BCB-Hilfe dazu.<br />
oder hier<br />
<a href="http://www.hlrs.de/people/mueller/tutorials/script/scriptch6.html#x59-1550006" rel="nofollow">http://www.hlrs.de/people/mueller/tutorials/script/scriptch6.html#x59-1550006</a><br />
<a href="http://tutorial.schornboeck.net/exceptions.htm" rel="nofollow">http://tutorial.schornboeck.net/exceptions.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126090</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 28 Aug 2006 12:15:36 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Try Catch und Exeptions on Mon, 28 Aug 2006 12:18:08 GMT]]></title><description><![CDATA[<p>Vielen Dank</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126092</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126092</guid><dc:creator><![CDATA[Croatiancow]]></dc:creator><pubDate>Mon, 28 Aug 2006 12:18:08 GMT</pubDate></item><item><title><![CDATA[Reply to Frage zu Try Catch und Exeptions on Mon, 28 Aug 2006 12:21:46 GMT]]></title><description><![CDATA[<p>Noch etwas mehr<br />
<a href="http://www.highscore.de/cpp/aufbau/exceptions.html" rel="nofollow">http://www.highscore.de/cpp/aufbau/exceptions.html</a><br />
<a href="http://www.zfx.info/Tutorials.php?ID=82" rel="nofollow">http://www.zfx.info/Tutorials.php?ID=82</a><br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-t-is-139074.html" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-t-is-139074.html</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1126095</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1126095</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Mon, 28 Aug 2006 12:21:46 GMT</pubDate></item></channel></rss>