Fix for issue 829

Issue #829... (was that supposed to autocomplete?)
"Incorrect error message in _when_complete"
https://github.com/facebook/tornado/issues/829