mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Displaying error messages from ODB API on file open
Made sure that the error messages from the ODB API are picked if file open fails, and then displayed in an error messsage box.
This commit is contained in:
@@ -122,14 +122,17 @@ void RimGeoMechView::loadDataAndUpdate()
|
||||
|
||||
if (m_geomechCase)
|
||||
{
|
||||
if (!m_geomechCase->openGeoMechCase())
|
||||
{
|
||||
std::string errorMessage;
|
||||
if (!m_geomechCase->openGeoMechCase(&errorMessage))
|
||||
{
|
||||
QString displayMessage = errorMessage.empty() ? "Could not open the Odb file: \n" + m_geomechCase->caseFileName() : QString::fromStdString(errorMessage);
|
||||
|
||||
QMessageBox::warning(RiuMainWindow::instance(),
|
||||
"Error when opening project file",
|
||||
"Could not open the Odb file: \n"+ m_geomechCase->caseFileName());
|
||||
"File open error",
|
||||
displayMessage);
|
||||
m_geomechCase = NULL;
|
||||
return;
|
||||
}
|
||||
}
|
||||
// m_geoMechFullModel->clearAndSetReservoir(m_geomechCase->geoMechData(), this);
|
||||
}
|
||||
progress.incrementProgress();
|
||||
|
||||
Reference in New Issue
Block a user