接口 ExceptionConverter

    • 方法详细资料

      • convertCommitException

        RuntimeException convertCommitException​(RuntimeException e)
        Converts the exception thrown during the transaction commit phase
        参数:
        e - The exception being handled
        返回:
        The converted exception
      • convert

        RuntimeException convert​(HibernateException e,
                                 LockOptions lockOptions)
        Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.

        参数:
        e - The Hibernate exception.
        lockOptions - The lock options in effect at the time of exception (can be null)
        返回:
        The JPA-specified exception
      • convert

        RuntimeException convert​(HibernateException e)
        Converts a Hibernate-specific exception into a JPA-specified exception; note that the JPA specification makes use of exceptions outside its exception hierarchy, though they are all runtime exceptions.

        参数:
        e - The Hibernate exception.
        返回:
        The JPA-specified exception