Handle expected capabilities errors in IFD event manager
@@ -285,12 +285,22 @@ public class IfdEventRunner implements Runnable {
@Nullable
private IFDCapabilitiesType getCapabilities(String ifdName) {
+ try {
+ if (cm.getTerminals().getTerminal(ifdName).isCardPresent()) {
GetIFDCapabilities req = new GetIFDCapabilities();
req.setContextHandle(ctxHandle);
req.setIFDName(ifdName);
GetIFDCapabilitiesResponse res = (GetIFDCapabilitiesResponse) env.getDispatcher().safeDeliver(req);
return res.getIFDCapabilities();
}
+ } catch (NoSuchTerminal ex) {
+ LOG.debug("No terminal with the name '{}' available.", ifdName);
+ } catch (SCIOException ex) {
+ LOG.error("Error requesting card presence status.");
+ }
+
+ return null;
+ }
private boolean hasKeypad(@Nullable IFDCapabilitiesType capabilities) {
if (capabilities != null) {
