lib/compositeError.js
function CompositeError(message, innerErrors) {
  this.message = message;
  this.name = 'CompositeError';
  this.innerErrors = normalizeInnerErrors(innerErrors);
  Error.captureStackTrace(this, this.constructor);
  this.originalStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
  // Override the stack property
  Object.defineProperty(this, 'stack', {
    get: function() { return this.formatStackTraces(); }
  });
}
function CompositeError(message, innerErrors) {
  this.message = message;
  this.name = 'CompositeError';
  this.innerErrors = normalizeInnerErrors(innerErrors);
  Error.captureStackTrace(this, this.constructor);
  this.originalStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
  // Override the stack property
  Object.defineProperty(this, 'stack', {
    get: function() { return this.formatStackTraces(); }
  });
}
Initializes a new instance of the CompositeError class.
@param {string} message The error message.
@param {(Error|Error[])} [innerErrors] The inner error(s).
@api public