summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-18 00:46:14 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-18 00:46:14 -0300
commit7762e4ff31f3ecdedbf189a4b5787f8632823792 (patch)
tree14ad3a72120bd2d79b19596f950209bf73c49f2d
parenta272b806dae3613a400d65ef8faf84aa19449d9a (diff)
downloadclient-7762e4ff31f3ecdedbf189a4b5787f8632823792.tar.gz
client-7762e4ff31f3ecdedbf189a4b5787f8632823792.tar.bz2
client-7762e4ff31f3ecdedbf189a4b5787f8632823792.tar.xz
client-7762e4ff31f3ecdedbf189a4b5787f8632823792.zip
Start printing tracebacks, and save what decoder received as well
-rw-r--r--game/01_init.rpy2
-rw-r--r--game/02_init.rpy4
-rw-r--r--game/register.rpy1
3 files changed, 6 insertions, 1 deletions
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.")