var _a;

export const InvalidCapacityErrorSym = /*#__PURE__*/Symbol.for("@effect/core/io/Hub/errors/InvalidCapacity");
export class InvalidCapacityError extends Error {
  constructor(message) {
    super(message);
    this[_a] = "InvalidCapacityError";
    this.name = this[InvalidCapacityErrorSym];
  }

}
_a = InvalidCapacityErrorSym;
export function ensureCapacity(capacity) {
  if (capacity <= 0) {
    throw new InvalidCapacityError(`A Hub cannot have a capacity of ${capacity}`);
  }
}
export function isInvalidCapacityError(u) {
  return u instanceof Error && u[InvalidCapacityErrorSym] === "InvalidCapacityError";
}
//# sourceMappingURL=errors.mjs.map