matthijsgroen/js-factories — pull request #3 by radkodinev (2014-07-18 07:04:17+00:00)
Title: Throw Errors instead of strings

It's better to throw `Error`s instead of strings to get better stack traces and debugging information in general. Further explanations can be found in e.g.:
- [A String is not an Error](http://www.devthought.com/2011/12/22/a-string-is-not-an-error/), Guillermo Rauch, 2011-12-22
- [The art of throwing JavaScript errors, Part 2](http://www.nczonline.net/blog/2009/03/10/the-art-of-throwing-javascript-errors-part-2/), Nicholas C. Zakas, 2009-03-10

The Mocha testing framework even complains with the following error: `Error: the string "..." was thrown, throw an Error :)`.

(CI tests will pass once #1 gets merged.)