aqt.errors#
Classes#
Catch stderr and write into buffer. |
Functions#
|
Present a caught exception to the user using a pop-up. |
|
QtWebEngine sometimes spits out 'unknown error' messages to stderr on Windows. |
|
|
|
|
|
Module Contents#
- aqt.errors.show_exception(*, parent: QWidget, exception: Exception) None#
Present a caught exception to the user using a pop-up.
- aqt.errors.is_chromium_cert_error(error: str) bool#
QtWebEngine sometimes spits out ‘unknown error’ messages to stderr on Windows.
They appear to be IDS_SETTINGS_CERTIFICATE_MANAGER_UNKNOWN_ERROR in chrome/browser/ui/webui/certificates_handler.cc. At a guess, it’s the NetErrorToString() method.
The constant appears to get converted to an ID; the resources are found in files like this:
chrome/app/resources/generated_resources_fr-CA.xtb 2258:<translation id=”3380365263193509176”>Erreur inconnue</translation>
List derived with: qtwebengine-chromium% rg –no-heading –no-filename –no-line-number 3380365263193509176 | perl -pe ‘s/.*>(.*)<.*/”$1”,/’ | sort | uniq
This list has been manually updated to add a different Japanese translation, as the translations may change in different Chromium releases.
Judging by error reports, we can’t assume the error falls on a separate line: https://forums.ankiweb.net/t/topic/22036/
- aqt.errors.excepthook(etype, val, tb) None#
- class aqt.errors.ErrorHandler(mw: aqt.main.AnkiQt)#
Bases:
QObjectCatch stderr and write into buffer.
- ivl = 100#
- fatal_error_encountered = False#
- errorTimer#
- mw#
- timer: QTimer | None = None#
- pool = ''#
- unload() None#
- write(data: str) None#
- setTimer() None#
- tempFolderMsg() str#
- onTimeout() None#
- aqt.errors.addon_fmt(addmgr: aqt.addons.AddonManager, addon: aqt.addons.AddonMeta) str#
- aqt.errors.addon_debug_info() str#