function thrown2Error(err) {
    return new Error(
      `the ${utils$1.canonicalType(err)} ${stringify(
      err
    )} was thrown, throw an Error :)`
    );
  }
Converts thrown non-extensible type into proper Error.

@private
@param {*} thrown - Non-extensible type thrown by code
@return {Error}