public function findEntity($id) { $this->transaction->requestTransaction(); try { $item = Entity::fetchById($this->conn, $id); if (false === $item) { throw new ItemNotFoundException('Item not found.'); } return $item; } catch (Exception $exception) { $this->transaction->requestRollback(); throw $exception; } }