Improved exception handling inside session.py

darcs-hash:20090225152530-58103-a22a74d09019c6526eca460ffda2976c248316b7