Created
April 9, 2012 06:48
-
-
Save devinrhode2/2342024 to your computer and use it in GitHub Desktop.
javascript debugging trick
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
var foo = function foo(parameter){ | |
if (badParam(parameter)) { | |
//bark at whoever called this function | |
throw **foo.caller.name** + ' did ' + somethingBad; //bar | |
} | |
} | |
var bar = function bar(){ | |
foo(); | |
} | |
bar(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment