CashAgent: update errorCodes

This commit is contained in:
Siegfried Siegert 2023-06-15 14:16:03 +02:00
parent 59432735d0
commit 4cc4247744
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03

View File

@ -502,7 +502,7 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName)
if (!QLibrary::isLibrary(pluginName)) { if (!QLibrary::isLibrary(pluginName)) {
qCritical() << "ATBDeviceControllerPlugin: can not load CashAgentLib: " << pluginName; qCritical() << "ATBDeviceControllerPlugin: can not load CashAgentLib: " << pluginName;
this->errorCode = 5; this->errorCode = "CashAgentLib::NO_LIBRARY";
this->errorDescription = "ERROR: can not load CashAgentLib: " + pluginName; this->errorDescription = "ERROR: can not load CashAgentLib: " + pluginName;
return false; return false;
} }
@ -514,13 +514,15 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName)
if (!pluginLoader->isLoaded()) { if (!pluginLoader->isLoaded()) {
qCritical() << "ATBDeviceControllerPlugin: can not instantiate CashAgentLib: " << pluginName; qCritical() << "ATBDeviceControllerPlugin: can not instantiate CashAgentLib: " << pluginName;
qCritical() << " error: " << pluginLoader->errorString(); qCritical() << " error: " << pluginLoader->errorString();
this->errorCode = 6; this->errorCode = "CashAgentLib::NO_INSTANCE";
this->errorDescription = "ERROR: can not instantiate CashAgentLib: " + pluginName; this->errorDescription = "ERROR: can not instantiate CashAgentLib: " + pluginName;
return false; return false;
} }
if (plugin == nullptr) { if (plugin == nullptr) {
qCritical() << "ATBDeviceControllerPlugin: plugin is NULL"; qCritical() << "ATBDeviceControllerPlugin: plugin is NULL";
this->errorCode = "CashAgentLib::INSTANCE_IS_NULL";
this->errorDescription = "ERROR: CashAgentLib instance is NULL: " + pluginName;
} }
qCritical() << "ATBDeviceControllerPlugin: instantiate CashAgentLib: " << pluginName; qCritical() << "ATBDeviceControllerPlugin: instantiate CashAgentLib: " << pluginName;
@ -529,6 +531,8 @@ bool ATBDeviceControllerPlugin::private_loadCashAgentLib(QString pluginName)
if (this->hw == nullptr) { if (this->hw == nullptr) {
qCritical() << "ATBDeviceControllerPlugin: hw is NULL"; qCritical() << "ATBDeviceControllerPlugin: hw is NULL";
this->errorCode = "CashAgentLib::HW_IS_NULL";
this->errorDescription = "ERROR: CashAgentLib object_cast is NULL: " + pluginName;
} }
qCritical() << "ATBDeviceControllerPlugin: loaded CashAgentLib"; qCritical() << "ATBDeviceControllerPlugin: loaded CashAgentLib";