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:
Stein Dale
2015-06-04 13:08:21 +02:00
parent bd6e6acc53
commit 43f50dac41
5 changed files with 14 additions and 11 deletions

View File

@@ -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();

View File

@@ -37,7 +37,7 @@ public:
RigGeoMechCaseData(const std::string& fileName);
~RigGeoMechCaseData();
bool openAndReadFemParts();
bool openAndReadFemParts(std::string* errorMessage);
RigFemPartCollection* femParts();
const RigFemPartCollection* femParts() const;