Improve error output from exceptions