Commit 34a2fea3 by Julien Muchembled

Ignore but log exceptions while closing a connection for which a assertion failed

AssertionError are certainly more severe that any other exception
(including OperationFailure) because the process is in an unknown state.
1 parent 50134569
......@@ -14,6 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
from . import logging
from .protocol import (
NodeStates, Packets, Errors, BackendNotImplemented,
......@@ -92,8 +93,15 @@ class EventHandler(object):
"%s.%s does not implement %s"
% (m.im_class.__module__, m.im_class.__name__, m.__name__)))
except AssertionError:
conn.close()
raise
e = sys.exc_info()
try:
try:
conn.close()
except Exception:
logging.exception("")
raise e[0], e[1], e[2]
finally:
del e
def checkClusterName(self, name):
# raise an exception if the given name mismatch the current cluster name
......
......@@ -255,7 +255,7 @@ class NEOLogger(Logger):
record.msg = record.getMessage()
record.args = None
if record.exc_info:
record.msg += '\n' + ''.join(
record.msg = (record.msg and record.msg + '\n') + ''.join(
format_exception(*record.exc_info)).strip()
record.exc_info = None
self._queue(record)
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!