Make sure we always restore the error handler.

Change-Id: I27f5d11ea27f783eda71c2bfdba7e70695f5d53c
Merge "Make sure we always restore the error handler."