Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nette/application
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4e0af51477a776d4bc8da521fc92fed25476c918
Choose a base ref
..
head repository: nette/application
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 8d1573a7c345c14a4b8bfd24bd4e5493002e27af
Choose a head ref
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/Application/Application.php
7 changes: 4 additions & 3 deletions src/Application/Application.php
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ class Application extends Nette\Object
/** @var callable[] function (Application $sender); Occurs before the application loads presenter */
public $onStartup;

/** @var callable[] function (Application $sender, \Exception $e = NULL); Occurs before the application shuts down */
/** @var callable[] function (Application $sender, \Exception|\Throwable $e = NULL); Occurs before the application shuts down */
public $onShutdown;

/** @var callable[] function (Application $sender, Request $request); Occurs when a new request is received */
@@ -39,7 +39,7 @@ class Application extends Nette\Object
/** @var callable[] function (Application $sender, IResponse $response); Occurs when a new response is ready for dispatch */
public $onResponse;

/** @var callable[] function (Application $sender, \Exception $e); Occurs when an unhandled exception occurs in the application */
/** @var callable[] function (Application $sender, \Exception|\Throwable $e); Occurs when an unhandled exception occurs in the application */
public $onError;

/** @var Request[] */
@@ -158,9 +158,10 @@ public function processRequest(Request $request)


/**
* @param \Exception|\Throwable
* @return void
*/
public function processException(\Exception $e)
public function processException($e)
{
if (!$e instanceof BadRequestException && $this->httpResponse instanceof Nette\Http\Response) {
$this->httpResponse->warnOnBuffer = FALSE;