function create (Klass) {
/**
 * @param {Error}   [err]     - The original error, if any
 * @param {object}  [props]   - An object whose properties will be added to the error object
 * @param {string}  [message] - The error message. May contain {@link util#format} placeholders
 * @param {...*}    [params]  - Parameters that map to the `message` placeholders
 * @returns {Error}
 */
return function onoFactory (err, props, message, params) {   // eslint-disable-line no-unused-vars
  var formatArgs = [];
  var formattedMessage = '';

  // Determine which arguments were actually specified
  if (typeof err === 'string') {
    formatArgs = slice.call(arguments);
    err = props = undefined;
  }
  else if (typeof props === 'string') {
    formatArgs = slice.call(arguments, 1);
    props = undefined;
  }
  else if (typeof message === 'string') {
    formatArgs = slice.call(arguments, 2);
  }

  // If there are any format arguments, then format the error message
  if (formatArgs.length > 0) {
    formattedMessage = module.exports.formatter.apply(null, formatArgs);
  }

  if (err && err.message) {
    // The inner-error's message will be added to the new message
    formattedMessage += (formattedMessage ? ' \n' : '') + err.message;
  }

  // Create the new error
  // NOTE: DON'T move this to a separate function! We don't want to pollute the stack trace
  var newError = new Klass(formattedMessage);

  // Extend the new error with the additional properties
  extendError(newError, err);   // Copy properties of the original error
  extendToJSON(newError);       // Replace the original toJSON method
  extend(newError, props);      // Copy custom properties, possibly including a custom toJSON method

  return newError;
};
}
Creates a new {@link ono} function that creates the given Error class.

@param {Class} Klass - The Error subclass to create
@returns {ono}