now all error messages from musrview can be sent to PMsgBox.
This commit is contained in:
@ -297,7 +297,10 @@ int main(int argc, char *argv[])
|
|||||||
|
|
||||||
success = dataHandler->IsAllDataAvailable();
|
success = dataHandler->IsAllDataAvailable();
|
||||||
if (!success) {
|
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;
|
result = PMUSR_DATA_FILE_READ_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,8 +321,11 @@ int main(int argc, char *argv[])
|
|||||||
if (runPresent) {
|
if (runPresent) {
|
||||||
success = runListCollection->Add(i, kView);
|
success = runListCollection->Add(i, kView);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
std::cerr << std::endl << ">> musrview **ERROR** Couldn't handle run no " << i << " ";
|
errMsg << ">> musrview **ERROR** Couldn't handle run no " << i << " ";
|
||||||
std::cerr << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data();
|
errMsg << (*msrHandler->GetMsrRunList())[i].GetRunName()->Data() << "\n";
|
||||||
|
std::cerr << errMsg.str();
|
||||||
|
if (show_errMsgBox)
|
||||||
|
musrview_error_msg(errMsg.str());
|
||||||
result = PMUSR_MSR_RUN_ERROR;
|
result = PMUSR_MSR_RUN_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -359,8 +365,10 @@ int main(int argc, char *argv[])
|
|||||||
fourier, avg, theoAtData);
|
fourier, avg, theoAtData);
|
||||||
|
|
||||||
if (!musrCanvas->IsValid()) {
|
if (!musrCanvas->IsValid()) {
|
||||||
std::cerr << std::endl << ">> musrview **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.";
|
errMsg << ">> musrview **SEVERE ERROR** Couldn't invoke all necessary objects, will quit.\n";
|
||||||
std::cerr << std::endl;
|
std::cerr << errMsg.str();
|
||||||
|
if (show_errMsgBox)
|
||||||
|
musrview_error_msg(errMsg.str());
|
||||||
ok = false;
|
ok = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user