Merge "Slightly improve error handling"
am: a87126ad77

Change-Id: I2a32c1035f28c7ccdc2767a2a499d96a790922a6