function にしてみるとか

err_and_exit () {
trap 'echo "ERROR!!" ; exit 1' ERR
eval "$@"
}

err_and_exit 'hoge' 2>&1 | tee test.log