mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Guard nullpointer access and catch exceptions
This commit is contained in:
parent
60dbb8a715
commit
1350c56eaf
@ -718,7 +718,7 @@ QList<caf::PdmOptionItemInfo>
|
||||
}
|
||||
|
||||
if ( resType == RiaDefines::ResultCatType::FLOW_DIAGNOSTICS && m_eclipseCase &&
|
||||
m_eclipseCase->eclipseCaseData()->hasFractureResults() )
|
||||
m_eclipseCase->eclipseCaseData() && m_eclipseCase->eclipseCaseData()->hasFractureResults() )
|
||||
{
|
||||
// Flow diagnostics is not supported for dual porosity models
|
||||
continue;
|
||||
|
@ -18,26 +18,9 @@
|
||||
|
||||
#include "RimVfpTableExtractor.h"
|
||||
|
||||
// #include "RiaApplication.h"
|
||||
|
||||
// #include "RimCase.h"
|
||||
// #include "RimEclipseCase.h"
|
||||
// #include "RimGeoMechCase.h"
|
||||
// #include "RimOilField.h"
|
||||
// #include "RimProject.h"
|
||||
// #include "RimWellLogFile.h"
|
||||
// #include "RimWellPath.h"
|
||||
// #include "RimWellPathCollection.h"
|
||||
|
||||
#include "cafPdmUiItem.h"
|
||||
#include "cafUtils.h"
|
||||
|
||||
// #include <QDateTime>
|
||||
// #include <QDir>
|
||||
// #include <QFileInfo>
|
||||
|
||||
// #include "opm/parser/eclipse/EclipseState/Schedule/VFPInjTable.hpp"
|
||||
// #include "opm/parser/eclipse/EclipseState/Schedule/VFPProdTable.hpp"
|
||||
#include "opm/parser/eclipse/Parser/Parser.hpp"
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -47,6 +30,8 @@ std::vector<Opm::VFPInjTable> RimVfpTableExtractor::extractVfpInjectionTables( c
|
||||
{
|
||||
std::vector<Opm::VFPInjTable> tables;
|
||||
|
||||
try
|
||||
{
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile( filename );
|
||||
|
||||
@ -62,6 +47,10 @@ std::vector<Opm::VFPInjTable> RimVfpTableExtractor::extractVfpInjectionTables( c
|
||||
Opm::VFPInjTable table( *kw, unitSystem );
|
||||
tables.push_back( table );
|
||||
}
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
}
|
||||
|
||||
return tables;
|
||||
}
|
||||
@ -73,6 +62,8 @@ std::vector<Opm::VFPProdTable> RimVfpTableExtractor::extractVfpProductionTables(
|
||||
{
|
||||
std::vector<Opm::VFPProdTable> tables;
|
||||
|
||||
try
|
||||
{
|
||||
Opm::Parser parser;
|
||||
auto deck = parser.parseFile( filename );
|
||||
|
||||
@ -88,6 +79,10 @@ std::vector<Opm::VFPProdTable> RimVfpTableExtractor::extractVfpProductionTables(
|
||||
Opm::VFPProdTable table( *kw, unitSystem );
|
||||
tables.push_back( table );
|
||||
}
|
||||
}
|
||||
catch ( ... )
|
||||
{
|
||||
}
|
||||
|
||||
return tables;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user