Improve exception messaging handling.

If we catch an unknown exception, then fail, but output the stacktrace of the failing
thing in order to capture these errors.