diff --git a/doc/changelog.asciidoc b/doc/changelog.asciidoc index ea6a135f7..aaacd3ccb 100644 --- a/doc/changelog.asciidoc +++ b/doc/changelog.asciidoc @@ -51,6 +51,7 @@ Fixed - Crash when using `:debug-log-level` without a console attached. - Downloads are now hidden properly when the browser is in fullscreen mode. - Crash when setting `colors.webpage.bg` to an empty value with QtWebKit. +- Crash when the history database file is not a proper sqlite database. v1.8.1 (2019-09-27) ------------------- diff --git a/qutebrowser/misc/sql.py b/qutebrowser/misc/sql.py index 4a38a0c9c..d36cdd9ee 100644 --- a/qutebrowser/misc/sql.py +++ b/qutebrowser/misc/sql.py @@ -45,6 +45,7 @@ class SqliteErrorCode: CANTOPEN = '14' # unable to open database file PROTOCOL = '15' # locking protocol error CONSTRAINT = '19' # UNIQUE constraint failed + NOTADB = '26' # file is not a database class Error(Exception): @@ -104,6 +105,7 @@ def raise_sqlite_error(msg, error): SqliteErrorCode.FULL, SqliteErrorCode.CANTOPEN, SqliteErrorCode.PROTOCOL, + SqliteErrorCode.NOTADB, ] # WORKAROUND for https://bugreports.qt.io/browse/QTBUG-70506