Skip to content

Commit 69ee0be

Browse files
committed
ApplicationExtension: catchExceptions is always true on production mode (BC break)
1 parent 6f04f04 commit 69ee0be

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Bridges/ApplicationDI/ApplicationExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function getConfigSchema(): Nette\Schema\Schema
5656
return Expect::structure([
5757
'debugger' => Expect::bool(),
5858
'errorPresenter' => Expect::string('Nette:Error')->dynamic(),
59-
'catchExceptions' => Expect::bool(!$this->debugMode)->dynamic(),
59+
'catchExceptions' => Expect::bool()->dynamic(),
6060
'mapping' => Expect::arrayOf('string|array'),
6161
'scanDirs' => Expect::anyOf(Expect::arrayOf('string'), false)->default($this->scanDirs),
6262
'scanComposer' => Expect::bool(class_exists(ClassLoader::class)),
@@ -78,7 +78,7 @@ public function loadConfiguration()
7878

7979
$builder->addDefinition($this->prefix('application'))
8080
->setFactory(Nette\Application\Application::class)
81-
->addSetup('$catchExceptions', [$config->catchExceptions])
81+
->addSetup('$catchExceptions', [$this->debugMode ? $config->catchExceptions : true])
8282
->addSetup('$errorPresenter', [$config->errorPresenter]);
8383

8484
$this->compiler->addExportedType(Nette\Application\Application::class);

0 commit comments

Comments
 (0)