Implemented better error handling

This commit is contained in:
Luca D'Amico
2024-08-25 17:59:54 +02:00
parent ac5df00de3
commit 872514cce5
12 changed files with 251 additions and 224 deletions

View File

@@ -1,15 +1,16 @@
#pragma once
#include <QMessageBox>
#include "../../ndsfactory/nfresult.h"
void notifyExtractionResult(bool result)
void notifyExtractionResult(NFResult nfResult)
{
if (result)
if (nfResult.result)
{
QMessageBox::information(Q_NULLPTR, "NDSFactory", "Extraction completed!");
}
else
{
QMessageBox::critical(Q_NULLPTR, "NDSFactory", "Error during the extraction!");
QMessageBox::critical(Q_NULLPTR, "NDSFactory", nfResult.message.c_str());
}
}