Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions resources/lib/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import os.path
import sys
import threading

import xbmc

Expand Down Expand Up @@ -34,6 +35,13 @@ def run_addon():
append=append_log_file,
dual_logger=lambda x, y=4: xbmc.log(x, y))

def _thread_excepthook(args: threading.ExceptHookArgs) -> None:
name = args.thread.name if args.thread else "<unknown>"
Logger.error("Unhandled exception in thread '%s'", name,
exc_info=(args.exc_type, args.exc_value, args.exc_traceback))

threading.excepthook = _thread_excepthook

from resources.lib.urihandler import UriHandler
from resources.lib.addonsettings import AddonSettings
from resources.lib.textures import TextureHandler
Expand Down
Loading