better support for trace exceptions