Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Simple to use exception making helper. It will automatically make a function into an exception class. Simply make a function with exception(this); as its only contents. Use throw new FunctionName(etc) to make and throw the exception. exception will build the passed arguments into the instance by name and also set the name key to the function's name you called it from. Very easy! If you don't want to use the new keyword, you may use the form: return exception(); in the definition instead. See test.js for an example.