Package jnr.ffi

Class LastError


  • public final class LastError
    extends Object
    Provides access to the unix errno and windows GetLastError() value.
    • Method Detail

      • getLastError

        public static int getLastError​(Runtime runtime)
        Gets the value of errno from the last native call.
        Parameters:
        runtime - FFI runtime to get errno for.
        Returns:
        An integer containing the errno value.
      • setLastError

        public static void setLastError​(Runtime runtime,
                                        int error)
        Sets the native errno value.
        Parameters:
        runtime - FFI runtime to set errno for.
        error - The value to set errno to.