Commit a223625d authored by Michael Rauh's avatar Michael Rauh
Browse files

Add function to get long value from SCIOErrorCode

parent e45b7704
......@@ -188,8 +188,18 @@ public enum SCIOErrorCode {
return next;
}
}
// no match found, unkown error
// no match found, unknown error
return SCARD_F_UNKNOWN_ERROR;
}
public static long getLong(SCIOErrorCode code) {
for (SCIOErrorCode next : SCIOErrorCode.values()) {
if (next.name().equals(code.name())) {
return next.codes[0];
}
}
// no match found, unknown error (SCARD_F_UNKNOWN_ERROR)
return -2146435052;
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment