index.js
function StdError(message) {
  if (! (this instanceof StdError)) {
    return new StdError(message);
  }

  Error.captureStackTrace(this, this.constructor);

  this.code = this._defaults.code;
  this.name = this._defaults.name;
  this.message = this._defaults.message;

  switch (typeof(message)) {
    case "string":
      this.message = message;
      break;
    case "object":
      (message.code) && (this.code = message.code);
      (message.name) && (this.name = message.name);
      (message.message) && (this.message = message.message);
      break;
  }
}
function StdError(message) {
  if (! (this instanceof StdError)) {
    return new StdError(message);
  }

  Error.captureStackTrace(this, this.constructor);

  this.code = this._defaults.code;
  this.name = this._defaults.name;
  this.message = this._defaults.message;

  switch (typeof(message)) {
    case "string":
      this.message = message;
      break;
    case "object":
      (message.code) && (this.code = message.code);
      (message.name) && (this.name = message.name);
      (message.message) && (this.message = message.message);
      break;
  }
}
============================================================================== -- constructor