Package jnr.ffi
Class LastError
java.lang.Object
jnr.ffi.LastError
Provides access to the unix errno and windows GetLastError() value.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intgetLastError(Runtime runtime) Gets the value of errno from the last native call.static voidsetLastError(Runtime runtime, int error) Sets the native errno value.
-
Method Details
-
getLastError
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
Sets the native errno value.- Parameters:
runtime- FFI runtime to set errno for.error- The value to set errno to.
-