in reply to Re^2: how i capture a script error to a file ?
in thread how i capture a script error to a file ?
want to capture my script compilation erros ( or other errors ) to a log file
To capture compilation errors, redirect the STDERR of the invoking shell to the file as in my previous post:
$ perl script.pl 2>log.err
This also captures runtime errors thrown out STDERR. If you want to only capture fatal runtime errors, you might handle these through a DIE handler. However, this handler isn't setup if the compilation fails in the first place.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how i capture a script error to a file ?
by gabrielsousa (Sexton) on Apr 27, 2017 at 13:41 UTC | |
by shmem (Chancellor) on Apr 27, 2017 at 13:53 UTC |