diff options
Diffstat (limited to 'src/java/jogamp/common')
-rw-r--r-- | src/java/jogamp/common/os/UnixDynamicLinkerImpl.java | 5 | ||||
-rw-r--r-- | src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java b/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java index e4cdbda..7675977 100644 --- a/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java +++ b/src/java/jogamp/common/os/UnixDynamicLinkerImpl.java @@ -71,5 +71,8 @@ public class UnixDynamicLinkerImpl implements DynamicLinker { public void closeLibrary(long libraryHandle) { dlclose(libraryHandle); } - + + public String getLastError() { + return dlerror(); + } } diff --git a/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java b/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java index 17d4adc..884ac39 100644 --- a/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java +++ b/src/java/jogamp/common/os/WindowsDynamicLinkerImpl.java @@ -66,4 +66,9 @@ public class WindowsDynamicLinkerImpl implements DynamicLinker { FreeLibrary(libraryHandle); } + public String getLastError() { + final int err = GetLastError(); + return "Last error: 0x"+Integer.toHexString(err)+" ("+err+")"; + } + } |