private void throwMultiEventException ( Event < ? > eventThatThrewException ) { while ( throwable instanceof MultiEventException && throwable . getCause ( ) != null ) { eventThatThrewException = ( ( MultiEventException ) throwable ) . getEvent ( ) ; throwable = throwable . getCause ( ) ; } throw new MultiEventException ( eventThatThrewException , throwable ) ; }
Unwraps cause of throwable if the throwable is itself a MultiEventException . This eliminates much excessive noise that is purely implementation detail of MultiEvents from the stack trace .