Skip to content

Instantly share code, notes, and snippets.

@devinrhode2
Created April 9, 2012 06:48
Show Gist options
  • Save devinrhode2/2342024 to your computer and use it in GitHub Desktop.
Save devinrhode2/2342024 to your computer and use it in GitHub Desktop.
javascript debugging trick
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