print stacktraces for diagnostics exception.