Skip to content

Commit f2b46df

Browse files
authored
Improve developer experience: RuntimeException thrown by AbstractFactory::createObject now contains the reason.
This implements feature request #26550
1 parent 4e6f6ae commit f2b46df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ protected function createObject($type, $args)
129129
);
130130

131131
throw new RuntimeException(
132-
new Phrase('Type Error occurred when creating object: %type', ['type' => $type])
132+
new Phrase('Type Error occurred when creating object: %type, %msg', ['type' => $type, 'msg' => $exception->getMessage()])
133133
);
134134
}
135135
}

0 commit comments

Comments
 (0)