mirror of
https://github.com/meganz/MEGAcmd
synced 2025-09-03 15:25:08 +00:00
onEvent: Log error string in case of an error in the async callback.
This commit is contained in:
@@ -280,6 +280,9 @@ void MegaCmdGlobalListener::onEvent(MegaApi *api, MegaEvent *event)
|
|||||||
{
|
{
|
||||||
if (e->getValue() != MegaError::API_OK)
|
if (e->getValue() != MegaError::API_OK)
|
||||||
{
|
{
|
||||||
|
// We don't have access to MegaCmdExecuter's error handling methods here
|
||||||
|
std::string errorString(e->getErrorString());
|
||||||
|
LOG_err << "Failed to get user data: " << errorString;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
api->getAccountDetails(new MegaCmdListenerFuncExecuter(
|
api->getAccountDetails(new MegaCmdListenerFuncExecuter(
|
||||||
@@ -287,6 +290,8 @@ void MegaCmdGlobalListener::onEvent(MegaApi *api, MegaEvent *event)
|
|||||||
{
|
{
|
||||||
if (e->getValue() != MegaError::API_OK)
|
if (e->getValue() != MegaError::API_OK)
|
||||||
{
|
{
|
||||||
|
std::string errorString(e->getErrorString());
|
||||||
|
LOG_err << "Failed to get account details: " << errorString;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
std::unique_ptr<char[]> myEmail(api->getMyEmail());
|
std::unique_ptr<char[]> myEmail(api->getMyEmail());
|
||||||
|
Reference in New Issue
Block a user