Skip to content
Snippets Groups Projects
Commit 228f6dc6 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

catch a databased malformed exception to warn user. Fixes #5191

parent 802c999b
No related branches found
No related tags found
No related merge requests found
......@@ -121,6 +121,12 @@ class ChatControlSession(stanza_session.EncryptedStanzaSession):
msgtxt, tim=tim, subject=subject)
except exceptions.PysqliteOperationalError, e:
self.conn.dispatch('ERROR', (_('Disk WriteError'), str(e)))
except exceptions.DatabaseMalformed:
pritext = _('Database Error')
sectext = _('The database file (%s) cannot be read. Try to repair '
'it (see http://trac.gajim.org/wiki/DatabaseBackup) or remove '
'it (all history will be lost).') % common.logger.LOG_DB_PATH
self.conn.dispatch('ERROR', (pritext, sectext))
treat_as = gajim.config.get('treat_incoming_messages')
if treat_as:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment