@@ -89,6 +89,7 @@ public function handleException(ServerRequestInterface $request, Throwable $exce
8989 $ exceptionType = get_class ($ exception );
9090 $ handler = $ this ->getErrorHandler ($ exceptionType );
9191
92+ /** @var ResponseInterface */
9293 return $ handler ($ request , $ exception , $ this ->displayErrorDetails , $ this ->logErrors , $ this ->logErrorDetails );
9394 }
9495
@@ -141,7 +142,8 @@ public function getDefaultErrorHandler()
141142 *
142143 * The callable signature MUST match the ErrorHandlerInterface
143144 *
144- * @see \Slim\Interfaces\ErrorHandlerInterface
145+ * @param string|callable|ErrorHandler $handler
146+ * @see ErrorHandlerInterface
145147 *
146148 * 1. Instance of \Psr\Http\Message\ServerRequestInterface
147149 * 2. Instance of \Throwable
@@ -152,7 +154,6 @@ public function getDefaultErrorHandler()
152154 * The callable MUST return an instance of
153155 * \Psr\Http\Message\ResponseInterface.
154156 *
155- * @param string|callable|ErrorHandler $handler
156157 */
157158 public function setDefaultErrorHandler ($ handler ): self
158159 {
@@ -169,7 +170,12 @@ public function setDefaultErrorHandler($handler): self
169170 * Pass true to $handleSubclasses to make the handler handle all subclasses of
170171 * the type as well. Pass an array of classes to make the same function handle multiple exceptions.
171172 *
172- * @see \Slim\Interfaces\ErrorHandlerInterface
173+ * @param string|string[] $typeOrTypes Exception/Throwable name.
174+ * ie: RuntimeException::class or an array of classes
175+ * ie: [HttpNotFoundException::class, HttpMethodNotAllowedException::class]
176+ * @param string|callable|ErrorHandlerInterface $handler
177+ *
178+ * @see ErrorHandlerInterface
173179 *
174180 * 1. Instance of \Psr\Http\Message\ServerRequestInterface
175181 * 2. Instance of \Throwable
@@ -180,10 +186,6 @@ public function setDefaultErrorHandler($handler): self
180186 * The callable MUST return an instance of
181187 * \Psr\Http\Message\ResponseInterface.
182188 *
183- * @param string|string[] $typeOrTypes Exception/Throwable name.
184- * ie: RuntimeException::class or an array of classes
185- * ie: [HttpNotFoundException::class, HttpMethodNotAllowedException::class]
186- * @param string|callable|ErrorHandlerInterface $handler
187189 */
188190 public function setErrorHandler ($ typeOrTypes , $ handler , bool $ handleSubclasses = false ): self
189191 {
0 commit comments