Yoast\WP\SEO\Exceptions\OAuth\Tokens

Failed_Storage_Exception{}Yoast 1.0

Class Failed_Storage_Exception

Хуков нет.

Использование

$Failed_Storage_Exception = new Failed_Storage_Exception();
// use class methods

Методы

  1. public __construct( $reason = '' )

Код Failed_Storage_Exception{} Yoast 24.0

class Failed_Storage_Exception extends Exception {

	public const DEFAULT_MESSAGE = 'Token storing failed. Please try again.';

	/**
	 * Failed_Storage_Exception constructor.
	 *
	 * @param string $reason The reason why token storage failed. Optional.
	 */
	public function __construct( $reason = '' ) {
		$message = ( $reason ) ? \sprintf( 'Token storing failed. Reason: %s. Please try again', $reason ) : self::DEFAULT_MESSAGE;

		parent::__construct( $message, 500 );
	}
}