| 1 |
<?php |
| 2 |
|
| 3 |
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure. |
| 4 |
namespace Yoast\WP\SEO\Dashboard\Domain\Analytics_4; |
| 5 |
|
| 6 |
use Exception; |
| 7 |
|
| 8 |
/** |
| 9 |
* Exception for when an Analytics 4 request is invalid. |
| 10 |
*/ |
| 11 |
class Invalid_Request_Exception extends Exception { |
| 12 |
|
| 13 |
/** |
| 14 |
* Constructor of the exception. |
| 15 |
* |
| 16 |
* @param string $error_message The error message of the request. |
| 17 |
*/ |
| 18 |
public function __construct( $error_message ) { |
| 19 |
parent::__construct( 'The Analytics 4 request is invalid: ' . $error_message, 400 ); |
| 20 |
} |
| 21 |
} |
| 22 |
|