public function add($item) { try { return parent::add($item); } catch (\UnderflowException $e) { // ignore } catch (\OverflowException $e) { // ignore } $factory = $this->factory; $this->attach($factory($this)); return $this->add($item); }