Fix exception handling, lint

Change-Id: I5748b374f37d886c80a66afc6bf6a91f22058a50