Created
August 13, 2014 09:49
-
-
Save BastinRobin/572514a0673315b08d9e to your computer and use it in GitHub Desktop.
Javascript Error Logger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function log(e, msg) { | |
for (var i in e) { msg += i + "=" + e[i] + "\n"; } | |
(new Image()).src="log.pl?m=" + encodeURIComponent(msg); | |
} | |
function abc() { | |
try { | |
// ... function code | |
} catch(e) { log(e, "abc"); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment