He uses the following example for when to throw your own errors: var Controller = { addClass: function(element, className) { if (!element) { throw new Error("addClass: 1st argument missing."); } element.className += " " + className; } }; I don't think this is a very good as a native error will have all this information already in a stacktrace, and if you're running Chrome dev tools with 'Pause on exceptions' then you…
assert.ok(element)