We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b16dfc6 commit f87e101Copy full SHA for f87e101
lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php
@@ -104,11 +104,15 @@ public function getDefinitions()
104
* @param array $args
105
*
106
* @return object
107
- *
+ * @throws \Exception
108
*/
109
protected function createObject($type, $args)
110
{
111
- return new $type(...array_values($args));
+ try {
112
+ return new $type(...array_values($args));
113
+ } catch (\Throwable $e) {
114
+ throw new \Exception($e->getMessage(), null, $e);
115
+ }
116
}
117
118
/**
0 commit comments