Delphi-PRAXiS
Seite 1 von 2  1 2      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Exceptions speichern (https://www.delphipraxis.net/112437-exceptions-speichern.html)

Tommy1988 21. Apr 2008 14:29


Exceptions speichern
 
Aloha,

kann mir wer erklären, wie man auftretende Exceptions ("" is not a valid Integer-Value, usw)
speichern kann?

Ich habe schon selbst einiges probiert, doch klappt es nicht.

Bernhard Geyer 21. Apr 2008 14:31

Re: Exceptions speichern
 
Zitat:

Zitat von Tommy1988
Ich habe schon selbst einiges probiert, doch klappt es nicht.

Was hast du probiert und was klappt nicht?

Die Muhkuh 21. Apr 2008 14:32

Re: Exceptions speichern
 
Du könntest über TApplicationEvents.OnException die Fehler in eine Datei speichern.

Tommy1988 21. Apr 2008 14:44

Re: Exceptions speichern
 
So in etwa dieses hier:

Delphi-Quellcode:
var
ex: Exception;
i: SmallInt;
begin
try
 i := StrToInt(Edit1.Text); // ich gib ne kommazahl ein, um ex zu erreichen
except
on ex: Exception do
 ShowMessage('Exception detected:' +#13+
 ex.message);
end;
Aber da gibts nix wie "SafeToFile" oder so :/

Die Muhkuh 21. Apr 2008 14:52

Re: Exceptions speichern
 
Wie Du an die Nachricht dran kommst weißt Du, dann kannst die per TStringList, über TFileStream oder über AssignFile und Konsorten in eine Datei schreiben.

Apollonius 21. Apr 2008 17:28

Re: Exceptions speichern
 
Delphi-Referenz durchsuchenAcquireExceptionObject

Tommy1988 21. Apr 2008 17:38

Re: Exceptions speichern
 
leider klappt momentan garnix :wall:

Die Muhkuh 21. Apr 2008 17:39

Re: Exceptions speichern
 
Interessant, so kann das auch nicht klappen.

shmia 21. Apr 2008 17:41

Re: Exceptions speichern
 
Zitat:

Zitat von Tommy1988
leider klappt momentan garnix

Erklär doch mal von Anfang an, was du überhaupt erreichen möchtest.
Mit Exceptions kann man nämlich Vieles anstellen.

Tommy1988 21. Apr 2008 17:43

Re: Exceptions speichern
 
Naja, so gesehen möchte ich nur erreichen , dass ich zum schluss weis "wie man sowas macht"..

sry, hab seit 10 min frei ( :wall: ) und steh noch unter strom :feuerchen:


Alle Zeitangaben in WEZ +1. Es ist jetzt 00:24 Uhr.
Seite 1 von 2  1 2      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz