Added exception wrapper for uwsgi.