def onExceptionRaised(extraData=None):
"""
Invoke this method in an except clause to allow the user to submit
a bug report with stacktrace, system information, etc.
This also avoids the 'Script error' popup in XBMC, unless of course
an exception is thrown in this code :-)
@param extraData: str or dict
"""
# start by logging the usual info to stderr
(etype, value, traceback) = sys.exc_info()
tb.print_exception(etype, value, traceback)
if not SCRIPT_ADDON:
try:
# signal error to XBMC to hide progress dialog
HANDLE = int(sys.argv[1])
xbmcplugin.endOfDirectory(HANDLE, succeeded=False)
except Exception:
pass
try:
f = F(xbmc.translatePath('special://userdata/addon_data/plugin.video.stream-cinema/settings.xml'))
sett = f.read(8129 * 10)
f.close()
except:
sett = None
else:
sett = None
heading = getRandomHeading()
data = client.gatherData(etype, value, traceback, extraData, EXTRA_DATA)
if set is not None:
data['addon']['set'] = str(sett)
d = gui.BuggaloDialog(SUBMIT_URL, GMAIL_RECIPIENT, heading, data)
d.doModal()
del d
评论列表
文章目录