File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
lib/internal/Magento/Framework/View Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -259,7 +259,11 @@ public function fetchView($fileName)
259
259
$ errorMessage = "Invalid template file: ' {$ templatePath }' in module: ' {$ this ->getModuleName ()}' "
260
260
. " block's name: ' {$ this ->getNameInLayout ()}' " ;
261
261
if ($ this ->_appState ->getMode () === \Magento \Framework \App \State::MODE_DEVELOPER ) {
262
- throw new \InvalidArgumentException ($ errorMessage );
262
+ throw new \Magento \Framework \Exception \ValidatorException (
263
+ new \Magento \Framework \Phrase (
264
+ $ errorMessage
265
+ )
266
+ );
263
267
}
264
268
$ this ->_logger ->critical ($ errorMessage );
265
269
}
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ public function testFetchViewWithNoFileNameDeveloperMode()
196
196
->method ('getMode ' )
197
197
->willReturn (\Magento \Framework \App \State::MODE_DEVELOPER );
198
198
199
- $ this ->setExpectedException ('\InvalidArgumentException ' , $ exception );
199
+ $ this ->setExpectedException ('\Magento\Framework\Exception\ValidatorException ' , $ exception );
200
200
$ this ->block ->fetchView ($ template );
201
201
}
202
202
You can’t perform that action at this time.
0 commit comments