类 TransactionSystemException

    • 构造器详细资料

      • TransactionSystemException

        public TransactionSystemException​(String msg,
                                          Throwable cause)
        Constructor for TransactionSystemException.
        参数:
        msg - the detail message
        cause - the root cause from the transaction API in use
    • 方法详细资料

      • initApplicationException

        public void initApplicationException​(Throwable ex)
        Set an application exception that was thrown before this transaction exception, preserving the original exception despite the overriding TransactionSystemException.
        参数:
        ex - the application exception
        抛出:
        IllegalStateException - if this TransactionSystemException already holds an application exception
      • getApplicationException

        public final Throwable getApplicationException()
        Return the application exception that was thrown before this transaction exception, if any.
        返回:
        the application exception, or null if none set
      • getOriginalException

        public Throwable getOriginalException()
        Return the exception that was the first to be thrown within the failed transaction: i.e. the application exception, if any, or the TransactionSystemException's own cause.
        返回:
        the original exception, or null if there was none
      • contains

        public boolean contains​(Class<?> exType)
        从类复制的说明: NestedRuntimeException
        Check whether this exception contains an exception of the given type: either it is of the given class itself or it contains a nested cause of the given type.
        覆盖:
        contains 在类中 NestedRuntimeException
        参数:
        exType - the exception type to look for
        返回:
        whether there is a nested exception of the specified type