'use strict';

/**
 * Simple wrapper for 'Error' to provide a HTTP status code.
 */
module.exports = function(status, message) {
	if(message instanceof Error) {
		message.status = status;
		return message;
	}
	var error        = new Error(message);
	    error.status = status;
	return error;
}

@@ -26,57 +26,330 @@
 ple 
-wrapper for 'Error' to provide a HTTP status code
+utility that enhances the given error with a 'status' field.%0A *%0A * @param  %7BNumber%7D          status   HTTP status code.%0A * @param  %7B(String%7CError)%7D  message  Message describing the error, can also be%0A *                                    an instance of Error.%0A *%0A * @returns  %7BError%7D  Error object enhanced with a 'status'
 .%0A *

Add documentation for 'utils/error'.