Class Truth.SimpleAssertionError

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    Truth

    static final class Truth.SimpleAssertionError
    extends java.lang.AssertionError
    An AssertionError that (a) always supports a cause, even under old versions of Android and (b) omits "java.lang.AssertionError:" from the beginning of its toString() representation.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Throwable cause
      Separate cause field, in case initCause() fails.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private SimpleAssertionError​(java.lang.String message, java.lang.Throwable cause)  
    • Field Detail

      • cause

        private final java.lang.Throwable cause
        Separate cause field, in case initCause() fails.
    • Constructor Detail

      • SimpleAssertionError

        private SimpleAssertionError​(java.lang.String message,
                                     java.lang.Throwable cause)
    • Method Detail

      • createWithNoStack

        static Truth.SimpleAssertionError createWithNoStack​(java.lang.String message,
                                                            java.lang.Throwable cause)
      • getCause

        public java.lang.Throwable getCause()
        Overrides:
        getCause in class java.lang.Throwable
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Throwable