1
0
Fork 0

Fix transport exception not always using 255 exit code, fixes #11954

pull/11962/head
Jordi Boggiano 2024-05-02 16:06:26 +02:00
parent bcab1c4b8e
commit acf398281c
No known key found for this signature in database
GPG Key ID: 7BBD42C429EC80BC
2 changed files with 7 additions and 0 deletions

View File

@ -26,6 +26,11 @@ class TransportException extends \RuntimeException
/** @var array<mixed> */
protected $responseInfo = [];
public function __construct(string $message = "", int $code = 400, \Throwable $previous = null)
{
parent::__construct($message, $code, $previous);
}
/**
* @param array<string> $headers
*/

View File

@ -80,6 +80,8 @@ class Installer
// used/declared in SolverProblemsException, carried over here for completeness
public const ERROR_DEPENDENCY_RESOLUTION_FAILED = 2;
public const ERROR_AUDIT_FAILED = 5;
// technically exceptions are thrown with various status codes >400, but the process exit code is normalized to 255
public const ERROR_TRANSPORT_EXCEPTION = 255;
/**
* @var IOInterface