<?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[Exception]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich brauche mal ne kleine Hilfe zu Exceptions.</p>
<pre><code class="language-cpp">try
{
    CStdioFile test(Dateipfad,CFile::modeRead);	//öffnen der Datei zum lesen
....
}
catch(...)
{
   AfxMessageBox(&quot;Datei nicht gefunden&quot;);
}
</code></pre>
<p>ich möchte abfangen, das wenn die Datei nicht geöffnet werden konnte das er da eine Fehlermeldung bringt. Aber mit den 3 Punkten in dem Catch Block funktioniert das nicht immer zuverlässig. Ich weiß aber nicht welche Exception in da abfangen muss. So wie bei Speichermangel ist es ja CMemoryException aber wenn die Datei nicht existiert was brauche ich da???</p>
<p>MFG SPAXX</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/77032/exception</link><generator>RSS for Node</generator><lastBuildDate>Fri, 24 Apr 2026 11:34:54 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/77032.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jun 2004 06:44:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exception on Thu, 17 Jun 2004 06:44:26 GMT]]></title><description><![CDATA[<p>Hi Leute,</p>
<p>ich brauche mal ne kleine Hilfe zu Exceptions.</p>
<pre><code class="language-cpp">try
{
    CStdioFile test(Dateipfad,CFile::modeRead);	//öffnen der Datei zum lesen
....
}
catch(...)
{
   AfxMessageBox(&quot;Datei nicht gefunden&quot;);
}
</code></pre>
<p>ich möchte abfangen, das wenn die Datei nicht geöffnet werden konnte das er da eine Fehlermeldung bringt. Aber mit den 3 Punkten in dem Catch Block funktioniert das nicht immer zuverlässig. Ich weiß aber nicht welche Exception in da abfangen muss. So wie bei Speichermangel ist es ja CMemoryException aber wenn die Datei nicht existiert was brauche ich da???</p>
<p>MFG SPAXX</p>
]]></description><link>https://www.c-plusplus.net/forum/post/542051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/542051</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Thu, 17 Jun 2004 06:44:26 GMT</pubDate></item><item><title><![CDATA[Reply to Exception on Thu, 17 Jun 2004 06:47:22 GMT]]></title><description><![CDATA[<p>wenn die datei nicht existiert wäre wahrscheinlich ein CFileFind nicht verkehrt !</p>
]]></description><link>https://www.c-plusplus.net/forum/post/542054</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/542054</guid><dc:creator><![CDATA[karli85]]></dc:creator><pubDate>Thu, 17 Jun 2004 06:47:22 GMT</pubDate></item><item><title><![CDATA[Reply to Exception on Thu, 17 Jun 2004 06:58:53 GMT]]></title><description><![CDATA[<p>dank dir hat super geklappt</p>
]]></description><link>https://www.c-plusplus.net/forum/post/542063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/542063</guid><dc:creator><![CDATA[spaxx]]></dc:creator><pubDate>Thu, 17 Jun 2004 06:58:53 GMT</pubDate></item></channel></rss>