system/Config/Services.php
public static function exceptions(
		\Config\Exceptions $config = null,
		IncomingRequest $request = null,
		Response $response = null,
		bool $getShared = true
	)
	{
		if ($getShared)
		{
			return static::getSharedInstance('exceptions', $config, $request, $response);
		}

		if (empty($config))
		{
			$config = new \Config\Exceptions();
		}

		if (empty($request))
		{
			$request = static::request();
		}

		if (empty($response))
		{
			$response = static::response();
		}

		return (new Exceptions($config, $request, $response));
	}
public static function exceptions(
		\Config\Exceptions $config = null,
		IncomingRequest $request = null,
		Response $response = null,
		bool $getShared = true
	)
	{
		if ($getShared)
		{
			return static::getSharedInstance('exceptions', $config, $request, $response);
		}

		if (empty($config))
		{
			$config = new \Config\Exceptions();
		}

		if (empty($request))
		{
			$request = static::request();
		}

		if (empty($response))
		{
			$response = static::response();
		}

		return (new Exceptions($config, $request, $response));
	}
The Exceptions class holds the methods that handle:

- set_exception_handler
- set_error_handler
- register_shutdown_function

@param \Config\Exceptions                $config
@param \CodeIgniter\HTTP\IncomingRequest $request
@param \CodeIgniter\HTTP\Response        $response
@param boolean                           $getShared

@return \CodeIgniter\Debug\Exceptions