Skip to content

Commit

Permalink
ApplicationExtension: catchExceptions is always true on production mo…
Browse files Browse the repository at this point in the history
…de (BC break)
  • Loading branch information
dg committed Jun 16, 2020
1 parent 9d529b4 commit 1e117d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Bridges/ApplicationDI/ApplicationExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function getConfigSchema(): Nette\Schema\Schema
return Expect::structure([
'debugger' => Expect::bool(interface_exists(Tracy\IBarPanel::class)),
'errorPresenter' => Expect::string('Nette:Error')->dynamic(),
'catchExceptions' => Expect::bool(!$this->debugMode)->dynamic(),
'catchExceptions' => Expect::bool()->dynamic(),
'mapping' => Expect::arrayOf('string|array'),
'scanDirs' => Expect::anyOf(Expect::arrayOf('string'), false)->default($this->scanDirs),
'scanComposer' => Expect::bool(class_exists(ClassLoader::class)),
Expand All @@ -74,7 +74,7 @@ public function loadConfiguration()

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

if ($config->debugger) {
Expand Down

0 comments on commit 1e117d3

Please sign in to comment.