Files
woocommerce-subscriptions/includes/libraries/action-scheduler/classes/ActionScheduler_InvalidActionException.php
Prospress Inc 3ff3a8b701 2.4.7
2018-12-24 09:06:01 +01:00

29 lines
712 B
PHP
Executable File

<?php
/**
* InvalidAction Exception.
*
* Used for identifying actions that are invalid in some way.
*
* @package Prospress\ActionScheduler
*/
class ActionScheduler_InvalidActionException extends \InvalidArgumentException implements ActionScheduler_Exception {
/**
* Create a new exception when the action's args cannot be decoded to an array.
*
* @author Jeremy Pry
*
* @param string $action_id The action ID with bad args.
* @return static
*/
public static function from_decoding_args( $action_id ) {
$message = sprintf(
__( 'Action [%s] has invalid arguments. It cannot be JSON decoded to an array.', 'action-scheduler' ),
$action_id
);
return new static( $message );
}
}