File tree 1 file changed +8
-1
lines changed
lib/internal/Magento/Framework/Mview 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -277,12 +277,19 @@ public function update()
277
277
? View \StateInterface::STATUS_SUSPENDED
278
278
: View \StateInterface::STATUS_IDLE ;
279
279
$ this ->getState ()->setVersionId ($ currentVersionId )->setStatus ($ statusToRestore )->save ();
280
- } catch (Exception $ exception ) {
280
+ } catch (\ Throwable $ exception ) {
281
281
$ this ->getState ()->loadByView ($ this ->getId ());
282
282
$ statusToRestore = $ this ->getState ()->getStatus () === View \StateInterface::STATUS_SUSPENDED
283
283
? View \StateInterface::STATUS_SUSPENDED
284
284
: View \StateInterface::STATUS_IDLE ;
285
285
$ this ->getState ()->setStatus ($ statusToRestore )->save ();
286
+ if (!$ exception instanceof \Exception) {
287
+ $ exception = new \RuntimeException (
288
+ 'Error when updating an mview ' ,
289
+ 0 ,
290
+ $ exception
291
+ );
292
+ }
286
293
throw $ exception ;
287
294
}
288
295
}
You can’t perform that action at this time.
0 commit comments