[fpc-pascal]redirecting error messages

Michael Van Canneyt michael.vancanneyt at wisa.be
Wed Nov 22 17:39:14 CET 2000


On Wed, 22 Nov 2000, Udo Giacomozzi wrote:

> Hello,
> 
> is there a secure way to redirect/copy all error messages like "Access
> violation" (including all other error information) to a file?

Yes. Close stderr and reopen it with another filename.

  Close(StdErr);
  Assign(StdErr,'/dev/null');
  Rewrite(StdErr);

After this, all error messages will be written to '/dev/null'...

Michael.





More information about the fpc-pascal mailing list