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:
@@ -68,14 +68,14 @@ const RigFemPartCollection* RigGeoMechCaseData::femParts() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RigGeoMechCaseData::openAndReadFemParts()
|
||||
bool RigGeoMechCaseData::openAndReadFemParts(std::string* errorMessage)
|
||||
{
|
||||
|
||||
#ifdef USE_ODB_API
|
||||
m_readerInterface = new RifOdbReader;
|
||||
#endif
|
||||
|
||||
if (m_readerInterface.notNull() && m_readerInterface->openFile(m_geoMechCaseFileName))
|
||||
if (m_readerInterface.notNull() && m_readerInterface->openFile(m_geoMechCaseFileName, errorMessage))
|
||||
{
|
||||
m_femParts = new RigFemPartCollection();
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public:
|
||||
RigGeoMechCaseData(const std::string& fileName);
|
||||
~RigGeoMechCaseData();
|
||||
|
||||
bool openAndReadFemParts();
|
||||
bool openAndReadFemParts(std::string* errorMessage);
|
||||
|
||||
RigFemPartCollection* femParts();
|
||||
const RigFemPartCollection* femParts() const;
|
||||
|
||||
Reference in New Issue
Block a user