diff --git a/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp b/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp index f5b82646e..46d78adbb 100644 --- a/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/VFPInjTable.cpp @@ -98,10 +98,10 @@ void VFPInjTable::init(DeckKeywordConstPtr table, std::shared_ptr(header)->getString(0); + if (header->getItem()->hasValue(0)) { + units_string = header->getItem()->getString(0); } - catch (...) { + else { //If units does not exist in record, the default value is the //unit system of the deck itself: do nothing... } diff --git a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp index b58068583..bc4ca1176 100644 --- a/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp +++ b/opm/parser/eclipse/EclipseState/Tables/VFPProdTable.cpp @@ -98,10 +98,10 @@ void VFPProdTable::init(DeckKeywordConstPtr table, std::shared_ptrgetItem()->hasValue(0)) { units_string = header->getItem()->getString(0); } - catch (...) { + else { //If units does not exist in record, the default value is the //unit system of the deck itself: do nothing... }