~tcuthbert/wordpress/openstack-objectstorage-k8s

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/src/Event/EndEvent.php

  • Committer: Thomas Cuthbert
  • Date: 2020-04-23 05:22:45 UTC
  • Revision ID: thomas.cuthbert@canonical.com-20200423052245-1jxao3mw31w435js
[,r=trivial] bionic composer vendor update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
namespace GuzzleHttp\Event;
 
3
 
 
4
/**
 
5
 * A terminal event that is emitted when a request transaction has ended.
 
6
 *
 
7
 * This event is emitted for both successful responses and responses that
 
8
 * encountered an exception. You need to check if an exception is present
 
9
 * in your listener to know the difference.
 
10
 *
 
11
 * You MAY intercept the response associated with the event if needed, but keep
 
12
 * in mind that the "complete" event will not be triggered as a result.
 
13
 */
 
14
class EndEvent extends AbstractTransferEvent
 
15
{
 
16
    /**
 
17
     * Get the exception that was encountered (if any).
 
18
     *
 
19
     * This method should be used to check if the request was sent successfully
 
20
     * or if it encountered errors.
 
21
     *
 
22
     * @return \Exception|null
 
23
     */
 
24
    public function getException()
 
25
    {
 
26
        return $this->transaction->exception;
 
27
    }
 
28
}