Added Error codes
git-svn-id: https://svn.code.sf.net/p/libusbjava/code/trunk@307 94ad28fe-ef68-46b1-9651-e7ae4fcf1c4c
This commit is contained in:
@@ -20,6 +20,9 @@ public class LibusbError extends Exception {
|
||||
public static final int ERROR_NO_MEM = -11;
|
||||
public static final int ERROR_NOT_SUPPORTED = -12;
|
||||
public static final int ERROR_OTHER = -99;
|
||||
public static final int ERROR_JAVA_REFERENCES_NOT_LOADED = -100;
|
||||
public static final int ERROR_JAVA_WRONG_ENVIRONMENT = -101;
|
||||
public static final int ERROR_JAVA_ILEGAL_DEVICE_HANDLE = -102;
|
||||
|
||||
private int code = ERROR_NONE;
|
||||
|
||||
@@ -113,6 +116,24 @@ public class LibusbError extends Exception {
|
||||
break;
|
||||
}
|
||||
|
||||
case ERROR_JAVA_REFERENCES_NOT_LOADED:
|
||||
{
|
||||
result = "ERROR_JAVA_REFERENCES_NOT_LOADED";
|
||||
break;
|
||||
}
|
||||
|
||||
case ERROR_JAVA_WRONG_ENVIRONMENT:
|
||||
{
|
||||
result = "ERROR_JAVA_WRONG_ENVIRONMENT";
|
||||
break;
|
||||
}
|
||||
|
||||
case ERROR_JAVA_ILEGAL_DEVICE_HANDLE:
|
||||
{
|
||||
result = "ERROR_JAVA_ILEGAL_DEVICE_HANDLE";
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
{
|
||||
result = "ERROR_UNKNWON (" + code + ")";
|
||||
|
||||
Reference in New Issue
Block a user