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)) {
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";