diff options
Diffstat (limited to 'src/device/Driver.java')
| -rw-r--r-- | src/device/Driver.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/device/Driver.java b/src/device/Driver.java index d629aa7..a099d95 100644 --- a/src/device/Driver.java +++ b/src/device/Driver.java @@ -110,12 +110,15 @@ public class Driver{ // Init HIDAPI Library com.codeminders.hidapi.ClassPathLibraryLoader.loadNativeHIDLibrary(); + // Try not bind the device try { HIDManager man=HIDManager.getInstance(); this.device=man.openById(0x1770, 0xff00, null); + if(this.device==null) + throw new Exception(); } catch(Exception e){ - throw new InstantiationException("Failed to instanciate driver."); + throw new InstantiationException("Failed to instanciate driver. Device not found or permission denied (try as root)"); } } |
