Package jnr.ffi
Class LastError
- java.lang.Object
-
- jnr.ffi.LastError
-
public final class LastError extends java.lang.Object
Provides access to the unix errno and windows GetLastError() value.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
getLastError(Runtime runtime)
Gets the value of errno from the last native call.static void
setLastError(Runtime runtime, int error)
Sets the native errno 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.
-
-