src/Middleware/ErrorLogger.php
public function process(Request $request, Delegate $delegate) : Response
    {
        try {
            return $delegate->process($request);
        } catch (\Throwable $e) {
            $this->log->error($e->getMessage(), ['trace' => $e->getTraceAsString(), 'line' => $e->getLine(), 'file' => $e->getFile(), 'code' => $e->getCode()]);
            throw $e;
        }
    }
public function process(Request $request, Delegate $delegate) : Response
    {
        try {
            return $delegate->process($request);
        } catch (\Throwable $e) {
            $this->log->error($e->getMessage(), ['trace' => $e->getTraceAsString(), 'line' => $e->getLine(), 'file' => $e->getFile(), 'code' => $e->getCode()]);
            throw $e;
        }
    }
Run Middleware for a particular request

@param Request  $request    HTTP Foundation Request object
@param Delegate $delegate   Either the Router or HandlerContainer, depending on whether this is run pre or post
routing
@return Response