#NEWLINE# @ filters ( 'mysql' , sqla_exc . OperationalError , '.*\\(.*(?:2002|2003|2006|2013|1047)' ) #NEWLINE# @ filters ( 'postgresql' , sqla_exc . OperationalError , '.*could not connect to server' ) #NEWLINE# @ filters ( 'ibm_db_sa' , sqla_exc . OperationalError , '.*(?:30081)' ) #NEWLINE# def _is_db_connection_error( operational_error , match , engine_name , is_disconnect ) : #NEWLINE# #INDENT# 'Detect the exception as indicating a recoverable error on connect.' #NEWLINE# raise exception . DBConnectionError ( is_disconnect )