public static void propagateIfFatal ( Throwable t ) { if ( t instanceof VirtualMachineError ) { throw ( VirtualMachineError ) t ; } else if ( t instanceof ThreadDeath ) { throw ( ThreadDeath ) t ; } else if ( t instanceof LinkageError ) { throw ( LinkageError ) t ; } }
Taken from RxJava throwIfFatal which was taken from scala