<?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 abfangen?]]></title><description><![CDATA[<p>Hallo, ich bekomme immer einen Fehler, wenn das MaskEdit nicht richtig ausgefüllt wurde!</p>
<blockquote>
<p>Erste Gelegenheit für Exception bei $76F6B09E. Exception-Klasse EDBEditError mit Meldung 'Ungültiger Eingabewert. Mit der Taste ESC machen Sie die Änderungen rückgängig'. Prozess Projekt.exe (6108)</p>
</blockquote>
<p>Ich habe schon versucht, durch vorheriges Abfragen des Inhalts vom MaskEdit, den Fehler vorher auszuschließen, aber leider klappt das nicht! Jetzt würde ich lieber den Fehler über Exception oder so abfangen. Weiß einer wie das geht?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/252206/exception-abfangen</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 08:29:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/252206.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 16 Oct 2009 10:02:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 10:02:32 GMT]]></title><description><![CDATA[<p>Hallo, ich bekomme immer einen Fehler, wenn das MaskEdit nicht richtig ausgefüllt wurde!</p>
<blockquote>
<p>Erste Gelegenheit für Exception bei $76F6B09E. Exception-Klasse EDBEditError mit Meldung 'Ungültiger Eingabewert. Mit der Taste ESC machen Sie die Änderungen rückgängig'. Prozess Projekt.exe (6108)</p>
</blockquote>
<p>Ich habe schon versucht, durch vorheriges Abfragen des Inhalts vom MaskEdit, den Fehler vorher auszuschließen, aber leider klappt das nicht! Jetzt würde ich lieber den Fehler über Exception oder so abfangen. Weiß einer wie das geht?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793280</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793280</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Fri, 16 Oct 2009 10:02:32 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 10:09:37 GMT]]></title><description><![CDATA[<p>Indem du die Exception mit catch einfach fängst.<br />
Das wird dir jetzt vermutlich nicht viel helfen, aber wer so dürftige Fragen stellt kann auch nur dürftige Antworten bekommen.</p>
<p>Lies dir bitte unbedingt mal den Thread <strong>Du brauchst Hilfe?</strong> hier im Forum durch, und stell deine Frage dann nochmal - und zwar so dass wir auch eine Chance haben dir zu antworten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793282</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793282</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 10:09:37 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 10:39:19 GMT]]></title><description><![CDATA[<p>So ich habe jetzt mal das mit der Exception ausprobiert, aber der Fehler bleibt der Gleiche!</p>
<pre><code>try {
		if (!istime(AuftragsUhrzeitEdit-&gt;Text)) {
			MessageBeep(0);
			ShowMessage(&quot;Es wurde keine korrekte Uhrzeit angegeben!&quot;);
			return;
		}
	} catch (...) {
		ShowMessage(&quot;fehler&quot;);
		return;
	}
</code></pre>
<p>istime() schaut, ob im MaskEdit (AuftragsUhrzeitEdit) eine korrekte Uhrzeit angegeben wurde...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793293</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793293</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Fri, 16 Oct 2009 10:39:19 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 10:42:03 GMT]]></title><description><![CDATA[<p>dann taucht die exception wohl nicht in dem try-Block auf sondern an anderer Stelle.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793294</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793294</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 10:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 10:42:54 GMT]]></title><description><![CDATA[<p>Da funkt vielleicht der Debugger dazwischen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793296</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793296</guid><dc:creator><![CDATA[Registrierter Troll]]></dc:creator><pubDate>Fri, 16 Oct 2009 10:42:54 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 11:07:47 GMT]]></title><description><![CDATA[<p>pumuckl, das dacht ich erst auch, deshalb hatte ich auch ein return; hinter diesen Code gemacht, aber der Fehler kommt trotzdem!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793307</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793307</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:07:47 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 11:29:55 GMT]]></title><description><![CDATA[<p>MichelM schrieb:</p>
<blockquote>
<p>pumuckl, das dacht ich erst auch, deshalb hatte ich auch ein return; hinter diesen Code gemacht, aber der Fehler kommt trotzdem!</p>
</blockquote>
<p>Ein return fängt aber keine Exceptions die an anderer Stelle auftreten. Was für ein Framework benutzt du da überhaupt? Vielleicht kann dir in dem richtigen Forum besser geholfen werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793313</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793313</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:29:55 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 11:42:26 GMT]]></title><description><![CDATA[<p>wie kann der Fehler denn auftreten, wenn das return; die procedure beendet? so wird doch nachfolgender Code überhaupt nicht erreicht!</p>
<p>Also wegen dem Framework habe ich keine Ahnung, wenns dir weiterhilft, ich habe den CodeGear C++ Builder 2009</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793318</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793318</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:42:26 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 11:47:23 GMT]]></title><description><![CDATA[<p>MichelM schrieb:</p>
<blockquote>
<p>wie kann der Fehler denn auftreten, wenn das return; die procedure beendet?</p>
</blockquote>
<p>Indem er an einer Stelle auftritt, die vor dem return durchlaufen wird oder sogar parallel dazu. Viele GUI-Framewors verwenden parallele Threads um ihre Eingaben, events etc. zu verarbeiten.</p>
<p>Google am besten mal nach &quot;EDBEditError&quot; - da findest du haufenweise Links zu genau diesem Thema.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793322</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793322</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 11:47:23 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 12:44:58 GMT]]></title><description><![CDATA[<p>Also vor dem return steht ja nur die Abrage des MaskEdits und eine Überprüfung dessen Inhalts. Durch das Googlen habe ich nur herausgefunden, dass der Fehler durch das MaskEdit ausgelöst wird, aber eine wirkliche Lösung konnte ich bis jetzt noch nicht finden. Ich gebe nochmal meinen genauen Code an:</p>
<pre><code class="language-cpp">if( e-&gt;ClassNameIs(&quot;EDBEditError&quot;) ) 
  { 
    /*MaskError trapped ;o))*/ 
    ((TCustomEdit *)Sender)-&gt;Clear(); 
    ((TWinControl *)Sender)-&gt;Focused(); 
  } 
  else 
  { 
    /*All other Errors*/ 
    Application-&gt;ShowException(e); 
  }
</code></pre>
<pre><code class="language-cpp">Boolean istime(AnsiString zeit){
	// Uhrzeit nicht korrekt
	if ((zeit.SubString(0,1) &lt; '0') || (zeit.SubString(0,1) &gt; '2') ||
		(zeit.SubString(1,1) &lt; '0') || (zeit.SubString(1,1) &gt; '9')){
		return false;
	}
	else if ((zeit.SubString(1,1)== '2') &amp;&amp; (zeit.SubString(2,1) &gt; '3')){
			return false;
		}
		else if (zeit.SubString(4,1) &gt; '5'){
				return false;
			}
			else if ((zeit.SubString(4,1) == &quot;&quot;) || (zeit.SubString(5,1) == &quot;&quot;)) {
					return false;
					}
	// Ansonsten gültige Uhrzeit
	return true;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1793369</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793369</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Fri, 16 Oct 2009 12:44:58 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Fri, 16 Oct 2009 13:19:07 GMT]]></title><description><![CDATA[<p>MichelM schrieb:</p>
<blockquote>
<p>Also vor dem return steht ja nur die <strong>Abrage des MaskEdits</strong> [...] dass der Fehler <strong>durch das MaskEdit ausgelöst</strong> wird,</p>
</blockquote>
<p>Merkste was? In deinem try-Block seh ich die Abfrage des MaskEdits nicht...</p>
<p>Kann natürlich auch sein dass du dem MaskEdit eine Fehlerbehandlungsroutine mitgeben kannst, z.B. eine etwas aussagekräftigere Fehlermeldung oder sonstetwas. Solang wir allerdings immernoch nicht wissen, welches GUI Framework das ist, kann man das nciht genau sagen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1793400</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1793400</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 16 Oct 2009 13:19:07 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Tue, 20 Oct 2009 21:52:35 GMT]]></title><description><![CDATA[<blockquote>
<p><strong>Erste Gelegenheit</strong> für Exception bei $76F6B09E. Exception-Klasse EDBEditError mit Meldung 'Ungültiger Eingabewert. Mit der Taste ESC machen Sie die Änderungen rückgängig'. Prozess Projekt.exe (6108)</p>
</blockquote>
<p>Na, wem fällt was auf?<br />
Kleiner Tipp, die Fehlermeldung die zeigt, dass die Ausnahme nicht gefangen wird heißt &quot;Unbehandelte Ausnahme&quot; (Unhandled exception)</p>
<p><a href="http://blogs.msdn.com/davidklinems/archive/2005/07/12/438061.aspx" rel="nofollow">http://blogs.msdn.com/davidklinems/archive/2005/07/12/438061.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1795538</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795538</guid><dc:creator><![CDATA[Kleiner Troll]]></dc:creator><pubDate>Tue, 20 Oct 2009 21:52:35 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Wed, 21 Oct 2009 09:19:19 GMT]]></title><description><![CDATA[<p>Kleiner Troll schrieb:</p>
<blockquote>
<p>Na, wem fällt was auf?</p>
</blockquote>
<p>Mir! <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>Registrierter Troll schrieb:</p>
<blockquote>
<p>Da funkt vielleicht der Debugger dazwischen.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1795665</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1795665</guid><dc:creator><![CDATA[Registrierter Troll]]></dc:creator><pubDate>Wed, 21 Oct 2009 09:19:19 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Wed, 21 Oct 2009 22:02:05 GMT]]></title><description><![CDATA[<p>irgendwie raff ich das net ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1796062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1796062</guid><dc:creator><![CDATA[MichelM]]></dc:creator><pubDate>Wed, 21 Oct 2009 22:02:05 GMT</pubDate></item><item><title><![CDATA[Reply to Exception abfangen? on Thu, 22 Oct 2009 12:38:24 GMT]]></title><description><![CDATA[<p>MichelM schrieb:</p>
<blockquote>
<p>irgendwie raff ich das net ...</p>
</blockquote>
<p>die ausgabe bedeutet nichts weiter, als:<br />
es ist ne exception geworfen worden und dein programm hat sie irgendwo aufgefangen - wirst du also mal bissl im callstack gucken müssen, wo sie geworfen und gefangen wurde, wenn du es noch immer nicht gefunden hast...</p>
<p>bb</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1796349</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1796349</guid><dc:creator><![CDATA[unskilled]]></dc:creator><pubDate>Thu, 22 Oct 2009 12:38:24 GMT</pubDate></item></channel></rss>