Last active
August 29, 2015 14:10
-
-
Save mfpiccolo/04a315b64ca7a58e651b to your computer and use it in GitHub Desktop.
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
class App.Logger | |
@add_error: (error_object) -> | |
@error ||= [] | |
@error.push(error_object) | |
jQueryInit = $.fn.init | |
$.fn.init = (selector, context) -> | |
element = new jQueryInit(selector, context) | |
if selector and element.length is 0 | |
# must include stacktrace library | |
# https://github.com/stacktracejs/stacktrace.js/blob/stable/dist/stacktrace.js | |
App.Logger.add_error({selector: selector, stack_trace: printStackTrace()}) | |
element |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment