<?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 Exception-Meldung ausgeben]]></title><description><![CDATA[<p>Wie kann ich die Exception-Meldung (Fehlermeldung) in einem try-catch Block ausgeben, welches alles Exceptions abfängt?</p>
<pre><code class="language-cpp">try{

..
} catch (...){

  Messagebox(0, ? ,0);  // hier würde ich gerne die Exception anzeigen lassen, nur wie? 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/138573/try-catch-exception-meldung-ausgeben</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 07:15:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/138573.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Feb 2006 15:25:07 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 15:25:07 GMT]]></title><description><![CDATA[<p>Wie kann ich die Exception-Meldung (Fehlermeldung) in einem try-catch Block ausgeben, welches alles Exceptions abfängt?</p>
<pre><code class="language-cpp">try{

..
} catch (...){

  Messagebox(0, ? ,0);  // hier würde ich gerne die Exception anzeigen lassen, nur wie? 
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1004301</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004301</guid><dc:creator><![CDATA[Rio1]]></dc:creator><pubDate>Mon, 27 Feb 2006 15:25:07 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 15:54:11 GMT]]></title><description><![CDATA[<p>Meinst du so in etwa?</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;windows.h&gt;
using namespace std;

int main ()
{
 int Version = 0; 

 try
 {
	Version = 5;
	 if (Version &lt; 3)
	throw &quot;Format veraltet, kann nicht gelesen werden&quot;;

	if (Version &gt; 3)
	throw &quot;Unbekanntes Format&quot;;
	}
 catch (char *Fehlerstring)
  {
    // Fehler ausgeben
    MessageBox(NULL,TEXT(Fehlerstring),NULL,NULL);
  }
 return 0;
 }
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1004349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004349</guid><dc:creator><![CDATA[EEK]]></dc:creator><pubDate>Mon, 27 Feb 2006 15:54:11 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 15:53:31 GMT]]></title><description><![CDATA[<p>Naja, mit catch(...) fängst du eine unbekannte Exception ab. Also weißt du auch nicht wo du ihren Fehlertext herbekommst. catch(...) sollte man sowieso nur dann machen, wenn man nicht weiß was alles geworfen werden kann. Eher ein schlechtes Zeichen.</p>
<p>Schau einfach in die Doku oder Source der Funktion, die eine Exception werfen kann und fange die spezielle Exception ab. Dann kannst du evtl. auch einen Fehlertext rausbekommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004352</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004352</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Mon, 27 Feb 2006 15:53:31 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 15:59:04 GMT]]></title><description><![CDATA[<blockquote>
<p>catch (char *Fehlerstring)<br />
{<br />
// Fehler ausgeben<br />
MessageBox(NULL,TEXT(Fehlerstring),NULL,NULL);<br />
}</p>
</blockquote>
<p>error C2065: 'LFehlerstring' : undeclared indentifier</p>
<p>??? Was ist falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004358</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004358</guid><dc:creator><![CDATA[Rio_1]]></dc:creator><pubDate>Mon, 27 Feb 2006 15:59:04 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:00:53 GMT]]></title><description><![CDATA[<p>Hm, das kann ich dir jetzt leider auch nicht sagen, mit dem VS 2003 funktioniert der Quellcode bei mir jedenfalls.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004362</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004362</guid><dc:creator><![CDATA[EEK]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:00:53 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:02:35 GMT]]></title><description><![CDATA[<p>ich hab hier embedded VC++. Es muss aber auch hier ein weg gehen. ist ziemlich an VC++ anglehnt. halt für pocket pcs.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004364</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004364</guid><dc:creator><![CDATA[Rio_1]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:02:35 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:02:43 GMT]]></title><description><![CDATA[<p>Gib doch einfach C2065 in den Such-Index deiner MSDN-Hilfe ein, da wird dir geholfen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004365</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004365</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:02:43 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:03:16 GMT]]></title><description><![CDATA[<p>Diese UNICODE-Mappings sollte man nur bei String-Literalen verwenden - das ist falsch (in der ASCII-Version dürfte es klappen, in der UNICODE-Version gibt's Probleme). Verwend' lieber ein Konvertierungsmakro ala A2T().</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004367</guid><dc:creator><![CDATA[CStoll (off)]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:03:16 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:04:20 GMT]]></title><description><![CDATA[<p>also eVC++ brauch immer WideStrings um Nachrichten darstellen zu können (so wie wchar_t, TCHAR)</p>
<p>..aber wie muss nun der catch-block aussehen. allein mit wchar_t in klammern kann der compiler auch nix anfangen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004369</guid><dc:creator><![CDATA[Rio_1]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:04:20 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 16:15:20 GMT]]></title><description><![CDATA[<p>Etwa so:</p>
<pre><code class="language-cpp">int main ()
{
  USES_CONVERSION;
  int Version = 0; 

  try
  {
    Version = 5;
    if (Version &lt; 3)
      throw &quot;Format veraltet, kann nicht gelesen werden&quot;;
    if (Version &gt; 3)
      throw &quot;Unbekanntes Format&quot;;
  }
  catch (char *Fehlerstring)
  {
    // Fehler ausgeben
    MessageBox(NULL,A2T(Fehlerstring),NULL,NULL);
  }
 return 0;
}
</code></pre>
<p>(A2T wandelt char-Strings in TCHAR-Strings um - USES_CONVERSION definiert dafür einige Hilfsvariablen)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1004379</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004379</guid><dc:creator><![CDATA[CStoll (off)]]></dc:creator><pubDate>Mon, 27 Feb 2006 16:15:20 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Mon, 27 Feb 2006 18:11:27 GMT]]></title><description><![CDATA[<p>Oder man benutzt gleich Wide-String Literale.</p>
<pre><code class="language-cpp">int main ()
{
	int Version = 0; 
	try
	{
		Version = 5;
		if (Version &lt; 3)
			throw L&quot;Format veraltet, kann nicht gelesen werden&quot;;
		if (Version &gt; 3)
			throw L&quot;Unbekanntes Format&quot;;
	}
	catch (const wchar_t* Fehlerstring)
	{
		// Fehler ausgeben
		MessageBoxW(NULL, Fehlerstring, NULL, 0);
	}
	return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1004505</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1004505</guid><dc:creator><![CDATA[groovemaster]]></dc:creator><pubDate>Mon, 27 Feb 2006 18:11:27 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Thu, 02 Mar 2006 12:03:05 GMT]]></title><description><![CDATA[<p>ok, folgende Compilermeldung kommt in eVC++:</p>
<pre><code>error LNK2001: unresolved external symbol &quot;const type_info::'vftable'&quot; (??_7type_info@@6B@)
</code></pre>
<p>kennt das wer?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1006682</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1006682</guid><dc:creator><![CDATA[Rio1]]></dc:creator><pubDate>Thu, 02 Mar 2006 12:03:05 GMT</pubDate></item><item><title><![CDATA[Reply to try-catch Exception-Meldung ausgeben on Thu, 02 Mar 2006 12:43:11 GMT]]></title><description><![CDATA[<p>ok da fehlte die ccrtrtti.lib als library</p>
<p>aber nun schmiert das programm beim aufruf der exception ab! keine ahnung warum.<br />
(catch(...) scheint dagegen zu funktionieren)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1006700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1006700</guid><dc:creator><![CDATA[Rio1]]></dc:creator><pubDate>Thu, 02 Mar 2006 12:43:11 GMT</pubDate></item></channel></rss>