Announcement

Collapse
No announcement yet.

Exception der Klasse EInvalidGrahic abfangen

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Exception der Klasse EInvalidGrahic abfangen

    Hallo,<br>
    wie kann ich mit Hilfe von try und catch eine Exception der Klasse EInvalidGrahic abfangen ? Damit mein Programm nicht abstürzt ?

    MfG Tobias

  • #2
    Hallo Tobias<br><br>

    Du musst einen try-catch-Block erstellen und im catch-Block die Exception EInvalidGraphic behandeln.
    Das könnte so aussehen:<br><br>

    try<br>
    {<br>
    //Hier steht dein Code<br>
    }<br>
    catch(EInvalidGraphic& e)<br>
    {<br>
    Application->MessageBox(e.Message.c_str(),"Graphic-Error",MB_ICONERROR); //Fehlermeldung wird angezeigt<br>
    }<br><br>

    Gruss<br>
    Marco Vergar

    Comment


    • #3
      Danke, hat geklappt ! MfG Tobia

      Comment

      Working...
      X