Get function backtrace in bash from trap handler (using caller)
I'm not sure if it will work, but try adding ERR
to your list of trap
'd signals. Maybe your code will be invoked before the set -e
stuff takes over, in which case you'll be back in business.