use an exception class to surface exceptions that we dont want to log to the metrics logging system

This commit is contained in:
sfaulds 2016-11-14 19:10:22 +11:00
parent 84165e6e64
commit aef40c4e8a
7 changed files with 35 additions and 7 deletions

View file

@ -24,6 +24,7 @@ import loghandler
from utils import window, dialog, language as lang
from ga_client import GoogleAnalytics
import database
import internal_exceptions
#################################################################################################
@ -161,10 +162,14 @@ if __name__ == "__main__":
try:
Main()
except internal_exceptions.ExceptionWrapper as error:
log.exception(error)
raise
except Exception as error:
ga = GoogleAnalytics()
errStrings = ga.formatException()
ga.sendEventData("Exception", errStrings[0], errStrings[1])
log.exception(error)
raise
log.info("plugin.video.emby stopped")