com.rational.test.ft

Class RationalTestException

  • java.lang.Object
    • java.lang.Throwable
      • java.lang.Exception
        • java.lang.RuntimeException
          • com.rational.test.ft.RationalTestException
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static java.lang.String className(java.lang.Throwable e)
      Gets the class name of the exception.
      IRationalThrowable fillinCombinedStackTrace()
      Combines the current stack in the current thread with the stacktrace from this exception.
      java.lang.String getClassName()
      Returns the class name.
      java.lang.String getContextDescription()
      Gets a description of the context of the exception within a script.
      java.lang.String getMessage() 
      static java.lang.String getReplacedExceptionMessage(java.lang.String key) 
      java.lang.String getStackTraceString()
      Gets a String representation of the stack for the current exception.
      void printStackTrace()
      Prints a String representation of the stack trace for the current exception to System.err.
      void printStackTrace(java.io.PrintStream s)
      Prints the stack trace for the current exception to a PrintStream object.
      void printStackTrace(java.io.PrintWriter s)
      Prints the stack trace for the current exception to a PrinteWriter object.
      void setContextDescription(java.lang.String s)
      Sets the exception context description.
      void setStackTraceString(java.lang.String s)
      Sets the String representation of the stack for the current exception.
      static java.lang.String stackTraceString(java.lang.Throwable e)
      Gets a String representation of the stackTrace from a throwable.
      void throwIt()
      Throws this throwable.
      • Methods inherited from class java.lang.Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, setStackTrace, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • RationalTestException

        public RationalTestException()
        Since:
        RFT1.0
      • RationalTestException

        public RationalTestException(java.lang.String msg)
        Since:
        RFT1.0
      • RationalTestException

        public RationalTestException(java.lang.String msg,
                                     java.lang.String stackTrace)
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Returns the class name.
        Specified by:
        getClassName in interface IRationalThrowable
        Since:
        RFT1.0
      • className

        public static java.lang.String className(java.lang.Throwable e)
        Gets the class name of the exception. For an IRationalThrowable, this invokes the getClassName method.
        Since:
        RFT1.0
      • stackTraceString

        public static java.lang.String stackTraceString(java.lang.Throwable e)
        Gets a String representation of the stackTrace from a throwable. Note that this does not include the first line, which is a description of the exception.
        Since:
        RFT1.0
      • getStackTraceString

        public java.lang.String getStackTraceString()
        Gets a String representation of the stack for the current exception.
        Specified by:
        getStackTraceString in interface IRationalThrowable
        Since:
        RFT1.0
      • setStackTraceString

        public void setStackTraceString(java.lang.String s)
        Sets the String representation of the stack for the current exception.
        Specified by:
        setStackTraceString in interface IRationalThrowable
        Since:
        RFT1.0
      • printStackTrace

        public void printStackTrace()
        Prints a String representation of the stack trace for the current exception to System.err.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Since:
        RFT1.0
      • printStackTrace

        public void printStackTrace(java.io.PrintStream s)
        Prints the stack trace for the current exception to a PrintStream object.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Since:
        RFT1.0
      • printStackTrace

        public void printStackTrace(java.io.PrintWriter s)
        Prints the stack trace for the current exception to a PrinteWriter object.
        Overrides:
        printStackTrace in class java.lang.Throwable
        Since:
        RFT1.0
      • getContextDescription

        public java.lang.String getContextDescription()
        Gets a description of the context of the exception within a script. (This may be null.)
        Specified by:
        getContextDescription in interface IRationalThrowable
        Since:
        RFT1.0
      • setContextDescription

        public void setContextDescription(java.lang.String s)
        Sets the exception context description.
        Specified by:
        setContextDescription in interface IRationalThrowable
        Since:
        RFT1.0
      • throwIt

        public void throwIt()
        Throws this throwable.
        Specified by:
        throwIt in interface IRationalThrowable
        Since:
        RFT1.0
      • fillinCombinedStackTrace

        public IRationalThrowable fillinCombinedStackTrace()
        Combines the current stack in the current thread with the stacktrace from this exception. The combined stack is persisted as a String.
        Specified by:
        fillinCombinedStackTrace in interface IRationalThrowable
        Since:
        RFT1.0
      • getMessage

        public java.lang.String getMessage()
        Overrides:
        getMessage in class java.lang.Throwable
      • getReplacedExceptionMessage

        public static java.lang.String getReplacedExceptionMessage(java.lang.String key)