chengkun
2025-09-12 26c5c0296e7c094f9a7ae4a4bb3c975796992eaf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
 
namespace AlibabaCloud\Tea\Exception;
 
use AlibabaCloud\Tea\Request;
 
/**
 * Class TeaUnableRetryError.
 */
class TeaUnableRetryError extends TeaError
{
    private $lastRequest;
    private $lastException;
 
    /**
     * TeaUnableRetryError constructor.
     *
     * @param Request         $lastRequest
     * @param null|\Exception $lastException
     */
    public function __construct($lastRequest, $lastException = null)
    {
        $error_info = [];
        if (null !== $lastException && $lastException instanceof TeaError) {
            $error_info = $lastException->getErrorInfo();
        }
        parent::__construct($error_info, $lastException->getMessage(), $lastException->getCode(), $lastException);
        $this->lastRequest   = $lastRequest;
        $this->lastException = $lastException;
    }
 
    public function getLastRequest()
    {
        return $this->lastRequest;
    }
 
    public function getLastException()
    {
        return $this->lastException;
    }
}