Sometimes you want to wrap error objects with application-specific errors for your stack traces.
This example also shows how to add an extra parameter called extra that will be stored as a property on the error.
Example usage:
var CustomError = require('./errors/custom-error');
function doSomethingBad() {
throw new CustomError('It went bad!', 42);
}