Skip to content

Commit

Permalink
- Check for simulation executable result. If it crash show error rath…
Browse files Browse the repository at this point in the history
…er than plot window.

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@10868 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adeas31 committed Jan 9, 2012
1 parent f28d566 commit c1839f2
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion OMEdit/OMEditGUI/SimulationWidget.cpp
Expand Up @@ -392,9 +392,16 @@ void SimulationWidget::simulateModel(QString simulationParameters)
if (sock) delete sock;
server.close();

// we set the Progress Dialog box to hide when we cancel the simulation, so don't show user the plottin view just return.
// we set the Progress Dialog box to hide when we cancel the simulation, so don't show user the plotting view just return.
if (mpProgressDialog->isHidden())
return;
if (mpSimulationProcess->CrashExit == QProcess::CrashExit)
{
QMessageBox::critical(this, Helper::applicationName + " - Error", GUIMessages::getMessage(GUIMessages::ERROR_OCCURRED).
arg(mpSimulationProcess->errorString().append(" ").append(mpSimulationProcess->readAllStandardError())),
tr("OK"));
return;
}
// read the output file
QString output_file = projectTab->mModelNameStructure;
if (!mpFileNameTextBox->text().isEmpty())
Expand Down

0 comments on commit c1839f2

Please sign in to comment.