src/mako/error/handlers/web/ProductionHandler.php
protected function getBody(Throwable $exception): string
	{
		if($this->returnAsJson())
		{
			$this->response->setType('application/json');

			return $this->getExceptionAsJson($exception);
		}

		if($this->returnAsXml())
		{
			$this->response->setType('application/xml');

			return $this->getExceptionAsXml($exception);
		}

		$this->response->setType('text/html');

		return $this->getExceptionAsRenderedView($exception);
	}
protected function getBody(Throwable $exception): string
	{
		if($this->returnAsJson())
		{
			$this->response->setType('application/json');

			return $this->getExceptionAsJson($exception);
		}

		if($this->returnAsXml())
		{
			$this->response->setType('application/xml');

			return $this->getExceptionAsXml($exception);
		}

		$this->response->setType('text/html');

		return $this->getExceptionAsRenderedView($exception);
	}
protected function getBody ( Throwable $ exception ) : string { if ( $ this -> returnAsJson ( ) ) { $ this -> response -> setType ( 'application/json' ) ; return $ this -> getExceptionAsJson ( $ exception ) ; } if ( $ this -> returnAsXml ( ) ) { $ this -> response -> setType ( 'application/xml' ) ; return $ this -> getExceptionAsXml ( $ exception ) ; } $ this -> response -> setType ( 'text/html' ) ; return $ this -> getExceptionAsRenderedView ( $ exception ) ; }
Returns a response body.

@param  \Throwable $exception Exception
@return string
Returns a response body .