Issue #3308162 by immaculatexavier, chaubeyji, joachim, catch: KernelTestBase::installConfig() should catch exceptions and rethrow them to say which module caused the problem
(cherry picked from commit cc7f697733
)
merge-requests/2451/merge
parent
52cc95b13d
commit
93c1a95d57
|
@ -701,7 +701,12 @@ abstract class KernelTestBase extends TestCase implements ServiceProviderInterfa
|
|||
if (!$this->container->get('module_handler')->moduleExists($module)) {
|
||||
throw new \LogicException("$module module is not enabled.");
|
||||
}
|
||||
$this->container->get('config.installer')->installDefaultConfig('module', $module);
|
||||
try {
|
||||
$this->container->get('config.installer')->installDefaultConfig('module', $module);
|
||||
}
|
||||
catch (\Exception $e) {
|
||||
throw new \Exception(sprintf('Exception when installing config for module %s, message was: %s', $module, $e->getMessage()), 0, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue