Class ExceptionsKt

  • All Implemented Interfaces:

    
    public final class ExceptionsKt
    
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final static Boolean assertEnabled
      private final static Void fail
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Boolean getAssertEnabled() This flag is true when assertions are enabled in the JVM (-ea flag).
      final Void getFail()
      final static Array<out StackTraceElement> filterStackTrace(Throwable $self, String prefix) Return the stack trace array of the frames that starts with the given prefix.
      final static String toText(Throwable $self, String prefix) Return this throwable as a text.
      final static Unit check(String message, Function0<Unit> blocks) TODO.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getAssertEnabled

         final Boolean getAssertEnabled()

        This flag is true when assertions are enabled in the JVM (-ea flag). Assertions are disabled by default in the JVM, but they are enabled (and should be that way) on the tests.

      • filterStackTrace

         final static Array<out StackTraceElement> filterStackTrace(Throwable $self, String prefix)

        Return the stack trace array of the frames that starts with the given prefix.

        Parameters:
        prefix - Prefix used to filter stack trace elements (applied to class names).
        Returns:

        Array with the frames of the throwable whose classes start with the given prefix.

      • toText

         final static String toText(Throwable $self, String prefix)

        Return this throwable as a text.

        Parameters:
        prefix - Optional prefix to filter stack trace elements.
        Returns:

        The filtered (if filter is provided) Throwable as a string.

      • check

         final static Unit check(String message, Function0<Unit> blocks)