@@ -852,8 +852,8 @@ def _prepare_all_queries(self, host):
852852 "statement on host %s: %r" , host , response )
853853
854854 log .debug ("Done preparing all known prepared statements against host %s" , host )
855- except OperationTimedOut :
856- log .warn ("Timed out trying to prepare all statements on host %s" , host )
855+ except OperationTimedOut as timeout :
856+ log .warn ("Timed out trying to prepare all statements on host %s: %s " , host , timeout )
857857 except (ConnectionException , socket .error ) as exc :
858858 log .warn ("Error trying to prepare all statements on host %s: %r" , host , exc )
859859 except Exception :
@@ -1644,8 +1644,9 @@ def wait_for_schema_agreement(self, connection=None):
16441644 timeout = min (2.0 , total_timeout - elapsed )
16451645 peers_result , local_result = connection .wait_for_responses (
16461646 peers_query , local_query , timeout = timeout )
1647- except OperationTimedOut :
1648- log .debug ("[control connection] Timed out waiting for response during schema agreement check" )
1647+ except OperationTimedOut as timeout :
1648+ log .debug ("[control connection] Timed out waiting for " \
1649+ "response during schema agreement check: %s" , timeout )
16491650 elapsed = self ._time .time () - start
16501651 continue
16511652
@@ -2189,7 +2190,7 @@ def result(self, timeout=_NOT_SET):
21892190 elif self ._final_exception :
21902191 raise self ._final_exception
21912192 else :
2192- raise OperationTimedOut ()
2193+ raise OperationTimedOut (errors = self . _errors , last_host = self . _current_host )
21932194
21942195 def get_query_trace (self , max_wait = None ):
21952196 """
0 commit comments