Dump traceback to log if initialisation fails.
[clinton/xbmc-groove.git] / default.py
index c881fb6..8667bfc 100644 (file)
@@ -16,7 +16,7 @@
 #    along with xbmc-groove.  If not, see <http://www.gnu.org/licenses/>.
 
 
-import urllib, sys, os, shutil, re, pickle, time, xbmcaddon, xbmcplugin, xbmcgui, xbmc
+import urllib, sys, os, shutil, re, pickle, time, traceback, xbmcaddon, xbmcplugin, xbmcgui, xbmc
 
 __addon__     = xbmcaddon.Addon('plugin.audio.groove')
 __addonname__ = __addon__.getAddonInfo('name')
@@ -103,6 +103,10 @@ try:
     if groovesharkApi.pingService() != True:
         raise StandardError(__language__(30007))
 except:
+    print "Exception on initialisation"
+    print '-'*60
+    traceback.print_exc()
+    print '-'*60
     dialog = xbmcgui.Dialog(__language__(30008),__language__(30009),__language__(30010))
     dialog.ok(__language__(30008),__language__(30009))
     sys.exit(-1)