Skip to content

Instantly share code, notes, and snippets.

@bga
Created July 15, 2010 12:03
Show Gist options
  • Save bga/476858 to your computer and use it in GitHub Desktop.
Save bga/476858 to your computer and use it in GitHub Desktop.
(function($G)
{
var _wrap = function(Class)
{
var _toString = Class.prototype.toString;
Class.prototype.toString = function()
{
console.error('stack trace\n' + (this.stack || '/* no stack trace */'));
return _toString.call(this);
};
};
_wrap($G.Error);
})(window);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment