square/picasso — pull request #99 by JayH5 (2013-06-24 21:22:36+00:00)
Title: Catch a more general exception when checking for rotation from content resolver

The behaviour of a content provider when it is queried for a column that does
not exist is not well defined. Content providers can throw any one of the
exceptions defined in Parcel as well as a number SQLiteExceptions via
DatabaseUtils.readException()/.writeException(). The native Android content
provider will throw an SQLiteException if the orientation column is not found.

Fix for issue #88

Look, I know catching such a general exception is not ideal... but at the moment catching an IllegalArgumentException just does not work at all. What I would suggest in the future is adding a "noAutoRotate(boolean)" or something like that to requests. There are cases where the user knows that the file/uri does not need rotating and specifying that could save an extra IO operation.