Save the error before $@ is overwritten.