em->wrapInTransaction($work); } catch (\Throwable $e) { $this->em->clear(); throw $e; } } }