From 7762e4ff31f3ecdedbf189a4b5787f8632823792 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 18 Dec 2020 00:46:14 -0300 Subject: Start printing tracebacks, and save what decoder received as well --- game/01_init.rpy | 2 +- game/02_init.rpy | 4 ++++ game/register.rpy | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) (limited to 'game') diff --git a/game/01_init.rpy b/game/01_init.rpy index 226c5d1..ae80f11 100644 --- a/game/01_init.rpy +++ b/game/01_init.rpy @@ -20,7 +20,7 @@ init -3 python: renpy.add_python_directory("python-extra") - import requests, zlib, base64, sys, copy, uuid, time, json + import requests, zlib, base64, sys, copy, uuid, time, json, traceback from ws4py.client.threadedclient import WebSocketClient # set PYTHON_VERSION variable (should be 2713, 3605 could fail) diff --git a/game/02_init.rpy b/game/02_init.rpy index add888a..4df1927 100644 --- a/game/02_init.rpy +++ b/game/02_init.rpy @@ -45,6 +45,7 @@ init -1 python: def json_decode(raw): global ERRNO + stdout("Decoder received %s" % repr(raw)) if (check_fail(raw)): return ERR_LOGIN_DEFAULT @@ -66,6 +67,7 @@ init -1 python: if (debug): print "base64 decoded" except: + traceback.print_exc() pass # Maybe zlib compressed @@ -75,12 +77,14 @@ init -1 python: if (debug): print str(raw) except: + traceback.print_exc() pass # Decode JSON try: return json.loads(raw) except: + traceback.print_exc() return ERR_JSONDECODER def get_token(): diff --git a/game/register.rpy b/game/register.rpy index d7dd45d..d09b579 100644 --- a/game/register.rpy +++ b/game/register.rpy @@ -92,6 +92,7 @@ label register_email: password=bt["password"] valid=True except: + traceback.print_exc() # Either a SQL error, or a server error, or a connection error... # But either way, we can't proceed! renpy.call_screen("msgbox", "An error happened, maybe this email is already registered.\nPlease try again later.") -- cgit v1.2.3-70-g09d2