From 4cc4247744de2169d82a46b2fa99530a61901827 Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Thu, 15 Jun 2023 14:16:03 +0200 Subject: [PATCH] CashAgent: update errorCodes --- src/ATBAPP/ATBDeviceControllerPlugin.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index a4a8de2..9ad08b3 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -502,7 +502,7 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName) if (!QLibrary::isLibrary(pluginName)) { qCritical() << "ATBDeviceControllerPlugin: can not load CashAgentLib: " << pluginName; - this->errorCode = 5; + this->errorCode = "CashAgentLib::NO_LIBRARY"; this->errorDescription = "ERROR: can not load CashAgentLib: " + pluginName; return false; } @@ -514,13 +514,15 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName) if (!pluginLoader->isLoaded()) { qCritical() << "ATBDeviceControllerPlugin: can not instantiate CashAgentLib: " << pluginName; qCritical() << " error: " << pluginLoader->errorString(); - this->errorCode = 6; + this->errorCode = "CashAgentLib::NO_INSTANCE"; this->errorDescription = "ERROR: can not instantiate CashAgentLib: " + pluginName; return false; } if (plugin == nullptr) { qCritical() << "ATBDeviceControllerPlugin: plugin is NULL"; + this->errorCode = "CashAgentLib::INSTANCE_IS_NULL"; + this->errorDescription = "ERROR: CashAgentLib instance is NULL: " + pluginName; } qCritical() << "ATBDeviceControllerPlugin: instantiate CashAgentLib: " << pluginName; @@ -529,6 +531,8 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName) if (this->hw == nullptr) { qCritical() << "ATBDeviceControllerPlugin: hw is NULL"; + this->errorCode = "CashAgentLib::HW_IS_NULL"; + this->errorDescription = "ERROR: CashAgentLib object_cast is NULL: " + pluginName; } qCritical() << "ATBDeviceControllerPlugin: loaded CashAgentLib";