# wordpress-seo/28.4/src/task-list/domain/exceptions/task-not-found-exception.php

Yoast SEO – Advanced SEO with real-time guidance and built-in AI, version 28.4. 20 lines.

- Page: https://pluginprobe.com/plugins/wordpress-seo/28.4/code/src/task-list/domain/exceptions/task-not-found-exception.php
- Raw: https://pluginprobe.com/plugins/wordpress-seo/28.4/raw/src/task-list/domain/exceptions/task-not-found-exception.php
- Modified: 2026-01-20T12:23:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wordpress-seo/28.4/code/src/task-list/domain/exceptions/task-not-found-exception.php#L10-L20`.

```php
<?php

// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Task_List\Domain\Exceptions;

use Exception;

/**
 * Exception for when the task is not found.
 */
class Task_Not_Found_Exception extends Exception {

	/**
	 * Constructor of the exception.
	 */
	public function __construct() {
		parent::__construct( 'Task not found', 404 );
	}
}

```
