catch a databased malformed exception to warn user. Fixes #5191
This commit is contained in:
parent
802c999ba4
commit
228f6dc6be
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue