File tree Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Expand file tree Collapse file tree 3 files changed +22
-12
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,7 @@ void Mesh::read()
607
607
<< " ' and will skip it due to read error:\n "
608
608
<< err.what () << std::endl;
609
609
map.forget (component);
610
+ continue ;
610
611
}
611
612
homogenizeExtents.check_extent (*this , rc);
612
613
}
@@ -635,6 +636,7 @@ void Mesh::read()
635
636
<< " ' and will skip it due to read error:\n "
636
637
<< err.what () << std::endl;
637
638
map.forget (component);
639
+ continue ;
638
640
}
639
641
homogenizeExtents.check_extent (*this , rc);
640
642
}
Original file line number Diff line number Diff line change @@ -98,6 +98,7 @@ void ParticleSpecies::read()
98
98
<< err.what () << std::endl;
99
99
100
100
map.forget (record_name);
101
+ continue ;
101
102
}
102
103
homogenizeExtents.merge (*this , std::move (recordExtents));
103
104
}
@@ -143,6 +144,7 @@ void ParticleSpecies::read()
143
144
map.forget (record_name);
144
145
// (*this)[record_name].erase(RecordComponent::SCALAR);
145
146
// this->erase(record_name);
147
+ continue ;
146
148
}
147
149
homogenizeExtents.merge (*this , std::move (recordExtents));
148
150
}
Original file line number Diff line number Diff line change @@ -113,18 +113,22 @@ auto Record::read() -> internal::HomogenizeExtents
113
113
};
114
114
if (scalar ())
115
115
{
116
- /* using operator[] will incorrectly update parent */
117
- try
118
- {
119
- T_RecordComponent::read (/* require_unit_si = */ true );
120
- }
121
- catch (error::ReadError const &err)
122
- {
123
- std::cerr << " Cannot read scalar record component and will skip it "
124
- " due to read error:\n "
125
- << err.what () << std::endl;
126
- }
127
- check_extent (*this );
116
+ [&]() {
117
+ /* using operator[] will incorrectly update parent */
118
+ try
119
+ {
120
+ T_RecordComponent::read (/* require_unit_si = */ true );
121
+ }
122
+ catch (error::ReadError const &err)
123
+ {
124
+ std::cerr
125
+ << " Cannot read scalar record component and will skip it "
126
+ " due to read error:\n "
127
+ << err.what () << std::endl;
128
+ return ; // from lambda
129
+ }
130
+ check_extent (*this );
131
+ }();
128
132
}
129
133
else
130
134
{
@@ -149,6 +153,7 @@ auto Record::read() -> internal::HomogenizeExtents
149
153
<< " ' and will skip it due to read error:\n "
150
154
<< err.what () << std::endl;
151
155
this ->container ().erase (component);
156
+ continue ;
152
157
}
153
158
check_extent (rc);
154
159
}
@@ -177,6 +182,7 @@ auto Record::read() -> internal::HomogenizeExtents
177
182
<< " ' and will skip it due to read error:\n "
178
183
<< err.what () << std::endl;
179
184
this ->container ().erase (component);
185
+ continue ;
180
186
}
181
187
check_extent (rc);
182
188
}
You can’t perform that action at this time.
0 commit comments