Die Log-Funktion geht sonst aber, die
AV wird nämlich geloggt.
Delphi-Quellcode:
constructor Tt4rCore.Create(AppName :
String);
begin
inherited Create;
//...
//Errorlog
ForceDirectories(Ft4rAppDataPath+T4R_LOGFOLDER_NAME+'
\');
FErrorLogFile := Ft4rAppDataPath+T4R_LOGFOLDER_NAME+'
\'+FAppName+'
.txt';
FErrorLogLevel := GetIniValue(T4R_INI_SECTION_MAIN, T4R_INI_SETTING_LOGLEVEL, T4R_INI_SETTING_LOGLEVEL_DEFAULT);
FErrorLogActive := true;
Application.OnException := AppException;
end;
procedure Tt4rCore.AppException(Sender: TObject; E:
Exception);
begin
try
if FErrorLogActive
then
ErrorLogWrite(T4R_FLAG_ERROR, '
('+E.ClassName+'
) '+E.
Message + '
(Error caused by ' + Sender.ClassName + '
)');
finally
Application.ShowException(E);
end;
end;