INNER CODE UNIT · Python

_java_class_names

micronaut-projects/micronaut-core · context-python/src/main/resources/META-INF/GRAALPY-VFS/micronaut-application/src/micronaut_asyncio.py:186

def _java_class_names(throwable):
    """The class names of a Java throwable and its superclasses, most specific first."""
    names = []
    try:
        java_class = throwable.getClass()
        while java_class is not None:
            names.append(java_class.getName())
            java_class = java_class.getSuperclass()
    except Exception:
        pass
    return names


def _java_failure_type(throwable):
    """The Python exception type for a Java throwable: networking failures become OSError subclasses.

    Timeouts are recognised before their broader parents (Netty's connect timeout is a
    ConnectException, its TLS handshake timeout an IOException).

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…