public static boolean isJvmFatalError(Throwable t) {
        return (t instanceof InternalError)
                || (t instanceof UnknownError)
                || (t instanceof ThreadDeath);
    }
@Test
    void testJvmFatalError() {
        // not all errors are fatal
        assertThat(ExceptionUtils.isJvmFatalError(new Error())).isFalse();

        // linkage errors are not fatal
        assertThat(ExceptionUtils.isJvmFatalError(new LinkageError())).isFalse();

        // some errors are fatal
        assertThat(ExceptionUtils.isJvmFatalError(new InternalError())).isTrue();
        assertThat(ExceptionUtils.isJvmFatalError(new UnknownError())).isTrue();
    }