mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Add basic debug info to unhandled error dialog
This commit is contained in:
parent
27b36ebefc
commit
2fbcd61fb4
@ -88,7 +88,6 @@ class MainWindow(QMainWindow):
|
|||||||
cls.___menu_bar = mb
|
cls.___menu_bar = mb
|
||||||
cls.___menu = menu
|
cls.___menu = menu
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_menubar_actions(cls):
|
def get_menubar_actions(cls):
|
||||||
preferences_action = QAction(QIcon(I('config.png')), _('&Preferences'), None)
|
preferences_action = QAction(QIcon(I('config.png')), _('&Preferences'), None)
|
||||||
@ -108,6 +107,11 @@ class MainWindow(QMainWindow):
|
|||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
sio = StringIO.StringIO()
|
sio = StringIO.StringIO()
|
||||||
|
try:
|
||||||
|
from calibre.debug import print_basic_debug_info
|
||||||
|
print_basic_debug_info(out=sio)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
traceback.print_exception(type, value, tb, file=sio)
|
traceback.print_exception(type, value, tb, file=sio)
|
||||||
fe = sio.getvalue()
|
fe = sio.getvalue()
|
||||||
prints(fe, file=sys.stderr)
|
prints(fe, file=sys.stderr)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user