@@ -29,7 +29,7 @@ class Application
2929 /** @var callable[] function (Application $sender); Occurs before the application loads presenter */
3030 public $ onStartup ;
3131
32- /** @var callable[] function (Application $sender, \Exception|\ Throwable $e = NULL); Occurs before the application shuts down */
32+ /** @var callable[] function (Application $sender, \Throwable $e = NULL); Occurs before the application shuts down */
3333 public $ onShutdown ;
3434
3535 /** @var callable[] function (Application $sender, Request $request); Occurs when a new request is received */
@@ -41,7 +41,7 @@ class Application
4141 /** @var callable[] function (Application $sender, IResponse $response); Occurs when a new response is ready for dispatch */
4242 public $ onResponse ;
4343
44- /** @var callable[] function (Application $sender, \Exception|\ Throwable $e); Occurs when an unhandled exception occurs in the application */
44+ /** @var callable[] function (Application $sender, \Throwable $e); Occurs when an unhandled exception occurs in the application */
4545 public $ onError ;
4646
4747 /** @var Request[] */
@@ -84,9 +84,6 @@ public function run()
8484 $ this ->onShutdown ($ this );
8585
8686 } catch (\Throwable $ e ) {
87- } catch (\Exception $ e ) {
88- }
89- if (isset ($ e )) {
9087 $ this ->onError ($ this , $ e );
9188 if ($ this ->catchExceptions && $ this ->errorPresenter ) {
9289 try {
@@ -96,8 +93,6 @@ public function run()
9693
9794 } catch (\Throwable $ e ) {
9895 $ this ->onError ($ this , $ e );
99- } catch (\Exception $ e ) {
100- $ this ->onError ($ this , $ e );
10196 }
10297 }
10398 $ this ->onShutdown ($ this , $ e );
@@ -156,7 +151,6 @@ public function processRequest(Request $request)
156151
157152
158153 /**
159- * @param \Exception|\Throwable
160154 * @return void
161155 */
162156 public function processException ($ e )
0 commit comments