var
fic: textfile;
(...)
try
j:=0;
i:=1 div j;
except
on E : Exception do
begin
AssignFile (fic,'logerrores.txt');
if FileExists('logerrores.txt')=false then
begin
ReWrite(fic);
end
else
begin
Append(fic);
end;
writeln(fic,datetostr(now()) + ' ' + timetostr(now()));
writeln(fic,'-------------------------------------------------------------------');
writeln(fic,'Exception class name = '+E.ClassName);
writeln(fic,'Exception message = '+E.Message);
writeln(fic,'');
CloseFile (fic);
end;
.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario