2
namespace GuzzleHttp\Event;
5
* A terminal event that is emitted when a request transaction has ended.
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.
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.
14
class EndEvent extends AbstractTransferEvent
17
* Get the exception that was encountered (if any).
19
* This method should be used to check if the request was sent successfully
20
* or if it encountered errors.
22
* @return \Exception|null
24
public function getException()
26
return $this->transaction->exception;