<?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]]></title><description><![CDATA[<p>Hallo,</p>
<p>eine Frage zu Try Catch.</p>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
	blah = new unsigned char[10];
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	try
     {
		blah[100000] = 10;
     }
     catch(exception_deklaration)
     {
      	Application-&gt;MessageBox(&quot;.......&quot;,&quot;.......&quot;,MB_OK);
     }
}
</code></pre>
<p>Wie muss die Exeption_deklaration sein, werde aus der Borland Hilfe nicht<br />
richtig schlau.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/102134/try-catch</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Jul 2026 12:18:58 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/102134.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 22 Feb 2005 23:35:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Try Catch on Tue, 22 Feb 2005 23:35:12 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>eine Frage zu Try Catch.</p>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
	blah = new unsigned char[10];
}
//---------------------------------------------------------------------------

void __fastcall TForm1::Button1Click(TObject *Sender)
{
	try
     {
		blah[100000] = 10;
     }
     catch(exception_deklaration)
     {
      	Application-&gt;MessageBox(&quot;.......&quot;,&quot;.......&quot;,MB_OK);
     }
}
</code></pre>
<p>Wie muss die Exeption_deklaration sein, werde aus der Borland Hilfe nicht<br />
richtig schlau.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730181</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730181</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Tue, 22 Feb 2005 23:35:12 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 00:02:49 GMT]]></title><description><![CDATA[<p>Z.B. (Exception &amp;e). Allerdings wird bei deinem Arrayzugriff nur mit Glück eine Exception geworfen (Access Violation) - und das ist eine Eigenheit vom BCB. Mit anderen Programmen wird dein Programm einfach abschmieren. Oder es passiert gar keine Exception, du überschreibst dir irgendwo was im Speicher, und nachher schmiert dein Programm ab ;).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730185</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730185</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Wed, 23 Feb 2005 00:02:49 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 01:12:26 GMT]]></title><description><![CDATA[<p>Das Array weiß ja nicht wie gross es ist, kann also so nicht feststellen, dass du hier auf nicht allozierten Speicher zugreifst. Wie Ringding schon sagte überschreibst du dir hier eine andere (evtl. genutzte) Speicherstelle. Wenn dein Programm dann darauf zugreifen will kann es abschmieren (also viel später).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730196</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730196</guid><dc:creator><![CDATA[Braunstein]]></dc:creator><pubDate>Wed, 23 Feb 2005 01:12:26 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 09:52:23 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Zur Deklaration : schau dir doch den Code der Projekt-Datei an, dort ist der Haupt Try-Catch Block.<br />
Zum Array : Wenn du DynamicArray oder std::vector nimmst, werden ordentliche Out-Of-Range Exceptions geworfen.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730336</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730336</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Wed, 23 Feb 2005 09:52:23 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 11:44:31 GMT]]></title><description><![CDATA[<p>Aber auch nur, wenn man at() und nicht [] verwendet.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730428</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Wed, 23 Feb 2005 11:44:31 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 11:46:42 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>So wird auf jede Exception reagiert, egal welche :</p>
<pre><code class="language-cpp">__fastcall TForm1::TForm1(TComponent* Owner) 
    : TForm(Owner) 
{ 
    blah = new unsigned char[10]; 
} 
//--------------------------------------------------------------------------- 

void __fastcall TForm1::Button1Click(TObject *Sender) 
{ 
    try 
     { 
        blah[100000] = 10; 
     } 
     catch( ... ) 
     { 
          Application-&gt;MessageBox(&quot;.......&quot;,&quot;.......&quot;,MB_OK); 
     } 
}
</code></pre>
<p>Bis dann denn,<br />
<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="🙂"
    /><br />
Nash</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730431</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730431</guid><dc:creator><![CDATA[Nash]]></dc:creator><pubDate>Wed, 23 Feb 2005 11:46:42 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Wed, 23 Feb 2005 11:48:23 GMT]]></title><description><![CDATA[<p>Das ist schon richtig, aber ein Speicherzugriffsfehler ist in sämtlichen anderen Umgebungen keine Exception. Das ist nur in BCB so.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/730433</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/730433</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Wed, 23 Feb 2005 11:48:23 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 14:15:40 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">ClientSocket1-&gt;Active = false;
     ClientSocket1-&gt;Port = 500;
     ClientSocket1-&gt;Address = &quot;localhost&quot;;
     ClientSocket1-&gt;Host    = &quot;localhost&quot;;
     try
     {
     	ClientSocket1-&gt;Active = true;

     }
     catch( ... )
     {
		Application-&gt;MessageBox(&quot;Cannot Connect&quot;,&quot;Client Error&quot;, MB_OK);

     }
</code></pre>
<p>Wie kann ich die Socket Exeption &quot;Asynchroner Socket-Fehler 10061&quot; abfangen.<br />
Mit der wie oben gezeigten Methode Funkt es nicht.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732215</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Fri, 25 Feb 2005 14:15:40 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 14:49:07 GMT]]></title><description><![CDATA[<p>guck mal in die bcb-hilfe zum OnError-Ereignis des TClientSocket</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732252</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732252</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Fri, 25 Feb 2005 14:49:07 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 16:20:26 GMT]]></title><description><![CDATA[<p>Das OnError Ereignis nutz ich schon, verhindert aber trotzdem nicht die<br />
Exeption, gibt es da nicht eine Möglichkeit in dem OnError Ereignis die<br />
Exeption zu löschen?<br />
Habe das schon mal irgendwo gelesen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732331</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732331</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Fri, 25 Feb 2005 16:20:26 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 16:45:46 GMT]]></title><description><![CDATA[<p>wenn du in der bcb hilfe zum on error ereignis geschaut hättest wüsstes du wie man die exception verhindern kannst.</p>
<p>aber mal ein tip: ErrorCode</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732345</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732345</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Fri, 25 Feb 2005 16:45:46 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 16:54:43 GMT]]></title><description><![CDATA[<p>Manchmal steht ja doch was Sinnvolles in der Borland Hilfe.</p>
<pre><code class="language-cpp">void __fastcall TForm1::ClientSocket1Error(TObject *Sender,
      TCustomWinSocket *Socket, TErrorEvent ErrorEvent, int &amp;ErrorCode)
{
      Edit3-&gt;Text = &quot;INVALID CONNECTION&quot;;
      ClientSocket1-&gt;Active = false;
      ErrorCode = 0;
}
</code></pre>
<p>Hätte das ganze auch schon mal genauer betrachten können, zumal eine<br />
Referenz auf ErrorCode mit übergeben wird, habe aber schon soviel<br />
verwirrendes Zeugs in der Borland Hilfe gelesen das ich manchmal schon<br />
garnicht mehr weiterlese.</p>
<p>Danke für die Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732351</guid><dc:creator><![CDATA[hermes]]></dc:creator><pubDate>Fri, 25 Feb 2005 16:54:43 GMT</pubDate></item><item><title><![CDATA[Reply to Try Catch on Fri, 25 Feb 2005 17:17:27 GMT]]></title><description><![CDATA[<p>wg Hilfe:</p>
<p>schonmal hier geguckt: <a href="http://www.junix.ch/bcb/help/hilfe.html" rel="nofollow">http://www.junix.ch/bcb/help/hilfe.html</a> ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/732367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/732367</guid><dc:creator><![CDATA[Beliah]]></dc:creator><pubDate>Fri, 25 Feb 2005 17:17:27 GMT</pubDate></item></channel></rss>