Indy Exception abfangen
hi,
was ist denn da bitte falsch? Egal ob ich per Firewall das Programm blocke oder nicht, es wirft imemr eine access denied raise exception von Indy, aber try except trifft nie ein, sprich:
Delphi-Quellcode:
trifft nie ein und bleibt somit leer!
var_Newsticker := 'You are not connected to the Internet (or your Firewall is blocking me) or my Homepage is down. Look for Help and Updates @ www.xyz.com';
Warum?
Delphi-Quellcode:
IdHTTPUpdate.ReadTimeout := 3000;
IdHTTPUpdate.ConnectTimeout := 3000; if InternetGetConnectedState(nil, 0) then try //1 masterserver := IdHTTPUpdate.Get(masterserver); masterserver := StringsucheVor(masterserver,'<frame src="','"'); onlineSettings := IdHTTPUpdate.Get(masterserver+'EasyMangosHandler/onlinesettings.ini'); finally try //2 AktuelleVersion := StringsucheVor(onlineSettings,'Version=<','>'); var_Newsticker := StringsucheVor(onlineSettings,'News=<','>'); var_Maps_download := StringsucheVor(onlineSettings,'Maps_Download=<','>'); DownloadLink := StringsucheVor(onlineSettings,'DownloadLink=<','>'); Changelog := StringsucheVor(onlineSettings,'Changelog=<','>'); except //2 var_Newsticker := 'You are not connected to the Internet (or your Firewall is blocking me) or my Homepage is down. Look for Help and Updates @ www.xyz.com'; end; end else //1 begin var_Newsticker := 'You are not connected to the Internet (or your Firewall is blocking me) or my Homepage is down. Look for Help and Updates @ www.xyz.com'; end; |
Re: Indy Exception abfangen
Hast du mal mit dem Debugger rausgefunden, in welcher Zeile die Exception ausgelöst wird?
|
Re: Indy Exception abfangen
Tausch mal finally und except. Bei einem Fehler wird derzeit bei dir der finally Block aufgerufen, wo aber nicht mehr der except-Block zum Zuge kommt...
|
Re: Indy Exception abfangen
Zitat:
Indy ignoriert das völlig --.-- |
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:29 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz