Handle more exception types
Handle more exception types

This regressed in 8b98e8f1425a. Sadly, this code is not type safe
and gets unicode instances causing a different exception.

Review: https://codereview.appspot.com/13368043/

salomon1184/rietveld,foolonhill/rietveld,openlabs/cr.openlabs.co.in,openlabs/cr.openlabs.co.in,arg0/rietveld,berkus/rietveld,dushmis/rietveld,sajingeo/rietveld,draem0507/rietveld,DeanHere/rietveld,gavioto/rietveld,ericmckean/rietveld,gavioto/rietveld,google-code-export/rietveld,DeanHere/rietveld,fuzan/rietveld,v3ss0n/rietveld,Koulio/rietveld,gco/rietveld,rietveld-codereview/rietveld,sajingeo/rietveld,rietveld-codereview/rietveld,aungzanbaw/rietveld,gco/rietveld,aungzanbaw/rietveld,fuzan/rietveld,foolonhill/rietveld,gco/rietveld,openlabs/cr.openlabs.co.in,sajingeo/rietveld,Koulio/rietveld,xtypebee/rietveld,berkus/rietveld,rietveld-codereview/rietveld,aungzanbaw/rietveld,supriyantomaftuh/rietveld,supriyantomaftuh/rietveld,v3ss0n/rietveld,xtypebee/rietveld,gavioto/rietveld,ericmckean/rietveld,Koulio/rietveld,supriyantomaftuh/rietveld,andyzsf/rietveld,xtypebee/rietveld,draem0507/rietveld,andyzsf/rietveld,robfig/rietveld,dushmis/rietveld,andyzsf/rietveld,robfig/rietveld,salomon1184/rietveld,berkus/rietveld,arg0/rietveld,rietveld-codereview/rietveld,robfig/rietveld,draem0507/rietveld,fuzan/rietveld,google-code-export/rietveld,foolonhill/rietveld,v3ss0n/rietveld,dushmis/rietveld,ericmckean/rietveld,DeanHere/rietveld,google-code-export/rietveld,arg0/rietveld,salomon1184/rietveld