add debugging output for sporadic issue #37

This commit is contained in:
Stefan Breunig 2013-02-15 16:56:01 +01:00
parent 6a5759f06c
commit dcd00b83db
2 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,7 @@ window.debug.renderDetails = function() {
window.debug.printStackTrace = function() {
var e = new Error('dummy');
console.log(e.stack);
return e.stack;
}
window.debug.clearPortals = function() {

View File

@ -44,6 +44,10 @@ window.resolvePlayerNames = function() {
window.setPlayerName = function(guid, nick) {
if($.trim(('' + nick)).slice(0, 5) === '{"L":' && !window.alertFor37WasShown) {
window.alertFor37WasShown = true;
alert('You have run into bug #37. Please help me solve it!\nCopy and paste this text and post it here:\nhttps://github.com/breunigs/ingress-intel-total-conversion/issues/37\nIf copy & pasting doesnt work, make a screenshot instead.\n\n\n' + window.debug.printStackTrace() + '\n\n\n' + JSON.stringify(nick));
}
localStorage[guid] = nick;
}