You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Documentation for withTimeout states that it throws a TimeoutCancellationException if the timeout was exceeded. However, the implementation throws a CancellationException if timeMillis <= 0. First, it looks like the implementation directly violates the documentation, because that's a case of an already exceeded timeout. Second, there's no notice of CancellationException in the docs altogether. Third, it makes no sense to state that the method throws a DerivedException when it throws BaseException, because one has to catch BaseException instead.
The text was updated successfully, but these errors were encountered:
Documentation for
withTimeout
states that it throws aTimeoutCancellationException
if the timeout was exceeded. However, the implementation throws aCancellationException
iftimeMillis <= 0
. First, it looks like the implementation directly violates the documentation, because that's a case of an already exceeded timeout. Second, there's no notice ofCancellationException
in the docs altogether. Third, it makes no sense to state that the method throws aDerivedException
when it throwsBaseException
, because one has to catchBaseException
instead.The text was updated successfully, but these errors were encountered: