now all error messages from musrview can be sent to PMsgBox.

This commit is contained in:
2025-06-29 09:12:11 +02:00
parent 832a74e0b5
commit 7491a2c331

View File

@ -297,7 +297,10 @@ int main(int argc, char *argv[])
success = dataHandler->IsAllDataAvailable();
if (!success) {
std::cerr << std::endl << ">> musrview **ERROR** Couldn't read all data files, will quit ..." << std::endl;
errMsg << ">> musrview **ERROR** Couldn't read all data files, will quit ...\n";
std::cerr << errMsg.str();
if (show_errMsgBox)
musrview_error_msg(errMsg.str());
result = PMUSR_DATA_FILE_READ_ERROR;
}
@ -318,8 +321,11 @@ int main(int argc, char *argv[])
if (runPresent) {
success = runListCollection->Add(i, kView);
if (!success) {
std::cerr << std::endl << ">> musrview **ERROR** Couldn't handle run no " << i << " ";
std::cerr << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data();
errMsg << ">> musrview **ERROR** Couldn't handle run no " << i << " ";
errMsg << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data() << "\n";
std::cerr << errMsg.str();
if (show_errMsgBox)
musrview_error_msg(errMsg.str());
result = PMUSR_MSR_RUN_ERROR;
break;
}
@ -359,8 +365,10 @@ int main(int argc, char *argv[])
fourier, avg, theoAtData);
if (!musrCanvas->IsValid()) {
std::cerr << std::endl << ">> musrview **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
std::cerr << std::endl;
errMsg << ">> musrview **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.\n";
std::cerr << errMsg.str();
if (show_errMsgBox)
musrview_error_msg(errMsg.str());
ok = false;
break;
}