autotest: Log errors raised by tests early.

Autotest catches exceptions raised by tests and raises them later, after it has
run some cleanup code. This CL adds logging at the point where the exception is
caught. This eases correlating the error with other (non-autotest) logs because
the timestamp on the log message is closer to the actual error.

BUG=chromium:403470
TEST=Run a faulty client test and observe the log message before messages logged
     by the cleanup code.

Change-Id: I47837c92755090b04393c6368ab82f035c33ed5f
Reviewed-on: https://chromium-review.googlesource.com/213350
Reviewed-by: Prashanth B <beeps@chromium.org>
Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
1 file changed