Fix #1406: Add TimeoutException and CancellationException
Merge pull request #1407 from alexandru/master

Fix #1406: Add TimeoutException and CancellationException