diff --git a/src/ExitException.php b/src/ExitException.php index 327d417..78fa931 100644 --- a/src/ExitException.php +++ b/src/ExitException.php @@ -8,8 +8,8 @@ use Throwable; * quitter normalement, avec éventuellement un code d'erreur. */ class ExitException extends UserException { - function __construct(int $exitcode=0, $user_message=null, Throwable $previous=null) { - parent::__construct($user_message, null, $exitcode, $previous); + function __construct(int $exitcode=0, $userMessage=null, Throwable $previous=null) { + parent::__construct($userMessage, null, $exitcode, $previous); } function isError(): bool { diff --git a/src/UserException.php b/src/UserException.php index 83e8966..4f4285a 100644 --- a/src/UserException.php +++ b/src/UserException.php @@ -75,12 +75,13 @@ class UserException extends RuntimeException { return implode("\n", $tbs); } - function __construct($user_message, $tech_message=null, $code=0, ?Throwable $previous=null) { - $this->userMessage = $user_message; - if ($tech_message === null) $tech_message = $user_message; - parent::__construct($tech_message, $code, $previous); + function __construct($userMessage, $techMessage=null, $code=0, ?Throwable $previous=null) { + $this->userMessage = $userMessage; + if ($techMessage === null) $techMessage = $userMessage; + parent::__construct($techMessage, $code, $previous); } + /** @var ?string */ protected $userMessage; function getUserMessage(): ?string { diff --git a/src/web/ext/CurlException.php b/src/web/curl/CurlException.php similarity index 68% rename from src/web/ext/CurlException.php rename to src/web/curl/CurlException.php index fbdcd1e..91ed199 100644 --- a/src/web/ext/CurlException.php +++ b/src/web/curl/CurlException.php @@ -1,5 +1,5 @@