static RuntimeException handleException(Throwable e) {
        if (e instanceof OutOfMemoryError error) {
            OutOfMemoryErrorDispatcher.onOutOfMemory(error);
            throw error;
        }
        if (e instanceof Error error) {
            throw error;
        }
        if (e instanceof HazelcastSerializationException exception) {
            return exception;
        }
        if (e instanceof HazelcastInstanceNotActiveException exception) {
            return exception;
        }
        if (e instanceof HazelcastClientNotActiveException exception) {
            return exception;
        }
        return new HazelcastSerializationException(e);
    }
@Test(expected = Error.class)
    public void testHandleException_otherError() {
        SerializationUtil.handleException(new UnknownError());
    }