Open Journal Systems  3.3.0
DiscoveryFailedException.php
1 <?php
2 
4 
6 
12 final class DiscoveryFailedException extends \Exception implements Exception
13 {
17  private $exceptions;
18 
23  public function __construct($message, array $exceptions = [])
24  {
25  $this->exceptions = $exceptions;
26 
27  parent::__construct($message);
28  }
29 
33  public static function create($exceptions)
34  {
35  $message = 'Could not find resource using any discovery strategy. Find more information at http://docs.php-http.org/en/latest/discovery.html#common-errors';
36  foreach ($exceptions as $e) {
37  $message .= "\n - ".$e->getMessage();
38  }
39  $message .= "\n\n";
40 
41  return new self($message, $exceptions);
42  }
43 
47  public function getExceptions()
48  {
49  return $this->exceptions;
50  }
51 }
Http\Discovery\Exception
Definition: paymethod/paypal/vendor/php-http/discovery/src/Exception.php:10
Http\Discovery\Exception\DiscoveryFailedException\__construct
__construct($message, array $exceptions=[])
Definition: DiscoveryFailedException.php:26
Http\Discovery\Exception\DiscoveryFailedException
Definition: DiscoveryFailedException.php:12
Http\Discovery\Exception\DiscoveryFailedException\getExceptions
getExceptions()
Definition: DiscoveryFailedException.php:50
Http\Discovery\Exception
Definition: ClassInstantiationFailedException.php:3
Http\Discovery\Exception\DiscoveryFailedException\create
static create($exceptions)
Definition: DiscoveryFailedException.php:36