<?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 Handling Problem]]></title><description><![CDATA[<p>hoi,<br />
folgendes: ich versuche gerade ein exception handling für den fall zu bauen, das keine verbindung zur MySQL-Datenbank aufgebaut werden kann (benutze MySQL++) ... nun hab ich ein problem. folgender code:</p>
<pre><code class="language-cpp">Connection sql_con(use_exceptions);
bool terprog = FALSE;
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
  try{
  sql_con.connect(&quot;grempelz&quot;,&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;);
  }catch (...){terprog = TRUE;}
}

...

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  if (terprog == TRUE)
  {
    Timer_1sec-&gt;Enabled = FALSE;
    if (Application-&gt;MessageBox(&quot;Ausnahmefehler. Eine Verbindung zur Datenbank konnte nicht hergestellt werden!&quot;,&quot;Ausnahmefehler&quot;,MB_OK | MB_ICONSTOP) == IDOK)
    {
      exit(0);
    }
</code></pre>
<p>nyo wenn die mysql-db erreichbar ist auch kein problem. wenn sie allerdings nicht erreichbar ist kommt<br />
&quot;Abnormal Program termination&quot;<br />
Klick auf OK<br />
&quot;Fehler in der Anwendung - Der Vorgang 'read' konnte nicht auf dem Speicher durchgeführt werden&quot;<br />
statt des gewünschten handlings ... warum?</p>
<p>thx bw</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/78647/exception-handling-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 29 Jun 2026 20:23:35 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/78647.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 03 Jul 2004 16:07:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Exception Handling Problem on Sat, 03 Jul 2004 16:07:48 GMT]]></title><description><![CDATA[<p>hoi,<br />
folgendes: ich versuche gerade ein exception handling für den fall zu bauen, das keine verbindung zur MySQL-Datenbank aufgebaut werden kann (benutze MySQL++) ... nun hab ich ein problem. folgender code:</p>
<pre><code class="language-cpp">Connection sql_con(use_exceptions);
bool terprog = FALSE;
__fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
{
  try{
  sql_con.connect(&quot;grempelz&quot;,&quot;localhost&quot;,&quot;root&quot;,&quot;&quot;);
  }catch (...){terprog = TRUE;}
}

...

void __fastcall TForm1::FormCreate(TObject *Sender)
{
  if (terprog == TRUE)
  {
    Timer_1sec-&gt;Enabled = FALSE;
    if (Application-&gt;MessageBox(&quot;Ausnahmefehler. Eine Verbindung zur Datenbank konnte nicht hergestellt werden!&quot;,&quot;Ausnahmefehler&quot;,MB_OK | MB_ICONSTOP) == IDOK)
    {
      exit(0);
    }
</code></pre>
<p>nyo wenn die mysql-db erreichbar ist auch kein problem. wenn sie allerdings nicht erreichbar ist kommt<br />
&quot;Abnormal Program termination&quot;<br />
Klick auf OK<br />
&quot;Fehler in der Anwendung - Der Vorgang 'read' konnte nicht auf dem Speicher durchgeführt werden&quot;<br />
statt des gewünschten handlings ... warum?</p>
<p>thx bw</p>
]]></description><link>https://www.c-plusplus.net/forum/post/552508</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/552508</guid><dc:creator><![CDATA[BW]]></dc:creator><pubDate>Sat, 03 Jul 2004 16:07:48 GMT</pubDate></item><item><title><![CDATA[Reply to Exception Handling Problem on Sat, 03 Jul 2004 20:10:37 GMT]]></title><description><![CDATA[<p>Also es ist schon eine Weile her, aber ich habe mir abgewöhnt den Konstruktor und! FormCreate gleichzeitig zu verwenden. Das hat nur Probleme gegeben. Ich verwende nur noch den Konstruktor. Ich glaube das hatte damals etwas mit der zeitlichen Reihenfolge zu tun.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/552634</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/552634</guid><dc:creator><![CDATA[gh]]></dc:creator><pubDate>Sat, 03 Jul 2004 20:10:37 GMT</pubDate></item><item><title><![CDATA[Reply to Exception Handling Problem on Sun, 04 Jul 2004 09:52:53 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>verwendest du moeglicher weise irgendwas wie FormDestroy ....<br />
wo noch irgendwas gemacht wird</p>
<p>- in FormCreate exit zu machen ist nicht gut<br />
- exit wuerde ich ganz weglassen -&gt;Appication-&gt;Terminate()<br />
<img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":("
      alt="😞"
    /></p>
<p>MfG<br />
Klaus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/552782</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/552782</guid><dc:creator><![CDATA[KlausB]]></dc:creator><pubDate>Sun, 04 Jul 2004 09:52:53 GMT</pubDate></item></channel></rss>