Bash error trap does not catch stderr output after redirection to file
In my bash script I redirected stdout and stderr to a logs file to prevent it from being printed in the terminal.
I set my script to exit on error occurrence using set -e
switch.