You could try to LOG all exceptions to a simple text file. Drop a TApplication component on the main form of your application and handle the OnException event. The code below, provides one such logging technique. Each exception is added to a simple ASCII file with the date and time of the exception (along with the exception's message):
Code:
procedure TForm1.ApplicationEvents1Exception(
Sender: TObject;
E: Exception) ;
var
ErrorLogFileName : string;
ErrorFile : TextFile;
ErrorData : string;
begin
ErrorLogFileName := ChangeFileExt(Application.ExeName,'.error.log') ;
AssignFile(ErrorFile, ErrorLogFileName) ;
//either create an error log file, or append to an existing one
if FileExists(ErrorLogFileName) then
Append(ErrorFile)
else
Rewrite(ErrorFile) ;
try
//add the current date/time and the exception message to the log
ErrorData := Format('%s : %s',[DateTimeToStr(Now),E.Message]) ;
WriteLn(ErrorFile,ErrorData) ;
finally
CloseFile(ErrorFile)
end;
//Show the exception
Application.ShowException(E) ;
end;
More information can be found here.
Bookmarks