Skip to content

Commit

Permalink
Create InvalidURI exception
Browse files Browse the repository at this point in the history
  • Loading branch information
JPry committed Oct 29, 2020
1 parent a83b407 commit c35b82f
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/Exception/InvalidURI.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php
declare( strict_types=1 );

namespace Automattic\WooCommerce\GoogleForWC\Exception;

use InvalidArgumentException;

/**
* Class InvalidURI
*
* @package Automattic\WooCommerce\GoogleForWC\Exception
*/
class InvalidURI extends InvalidArgumentException implements GoogleForWCException {

/**
* Create a new exception for an unreadable asset.
*
* @param string $path
*
* @return static
*/
public static function asset_path( string $path ) {
return new static( sprintf( 'The asset "%s" is unreadable. Do build scripts need to be run?', $path ) );
}
}

0 comments on commit c35b82f

Please sign in to comment.