GuzzleHttpPromiseexception_for

Create an exception for a rejected promise value.

Description

(Exception|Throwable) GuzzleHttp\Promise\exception_for( (mixed) $reason ); 

Returns (Exception|Throwable)

Parameters (1)

0. $reason (mixed)
The reason.

Usage

  1. if ( !function_exists( 'GuzzleHttp\Promise\exception_for' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'w3-total-cache/lib/Azure/GuzzleHttp/Promise/functions.php'; 
  3.  
  4. // The reason. 
  5. $reason = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = GuzzleHttp\Promise\exception_for($reason); 
  9.  

Defined (1)

The function is defined in the following location(s).

/lib/Azure/GuzzleHttp/Promise/functions.php