modifs.mineures sans commentaires
This commit is contained in:
parent
bf4b9dd386
commit
6d1995a90d
@ -347,7 +347,7 @@ class Aodef {
|
||||
$haveNull = true;
|
||||
break;
|
||||
} else {
|
||||
throw _exceptions::invalid_value("$desc: $arg", $kind, "ce n'est pas un argument valide");
|
||||
throw _exceptions::invalid_value("$desc: $arg");
|
||||
}
|
||||
}
|
||||
|
||||
@ -366,7 +366,7 @@ class Aodef {
|
||||
$haveNull = true;
|
||||
break;
|
||||
} else {
|
||||
throw _exceptions::invalid_value("$desc: $arg", $kind, "ce n'est pas un argument valide");
|
||||
throw _exceptions::invalid_value("$desc: $arg");
|
||||
}
|
||||
}
|
||||
if (!$haveOpt) $haveNull = true;
|
||||
@ -519,7 +519,7 @@ class Aodef {
|
||||
case "--set-args": $this->actionSetArgs($dest, $value); break;
|
||||
case "--set-command": $this->actionSetCommand($dest, $value); break;
|
||||
case "--show-help": $parser->actionPrintHelp($arg); break;
|
||||
default: throw _exceptions::invalid_value($this->action, $kind, "action non supportée");
|
||||
default: throw _exceptions::invalid_value($this->action, null, "action non supportée");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ class Aogroup extends Aolist {
|
||||
function __construct(array $defs, bool $setup=false) {
|
||||
$marker = A::pop($defs, 0);
|
||||
if ($marker !== "group") {
|
||||
throw _exceptions::missing_value(null, $kind, "ce n'est pas un groupe valide");
|
||||
throw _exceptions::missing_value(null, null, "ce n'est pas un groupe valide");
|
||||
}
|
||||
# réordonner les clés numériques
|
||||
$defs = array_merge($defs);
|
||||
|
@ -198,10 +198,10 @@ class cv {
|
||||
*
|
||||
* lever une exception si $value n'est d'aucun de ces types
|
||||
*/
|
||||
static final function check_key($value, ?string $kind=null, bool $throw_exception=true): array {
|
||||
static final function check_key($value, ?string $kind=null, bool $throwException=true): array {
|
||||
$index = is_int($value)? $value : null;
|
||||
$key = is_string($value)? $value : null;
|
||||
if ($index === null && $key === null && $throw_exception) {
|
||||
if ($index === null && $key === null && $throwException) {
|
||||
throw exceptions::invalid_type($value, $kind, "key");
|
||||
} else {
|
||||
return [$index, $key];
|
||||
|
@ -63,7 +63,7 @@ class console extends _messenger {
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
throw exceptions::forbidden_value($verbosity, $kind, ["silent", "quiet", "normal", "verbose", "debug"]);
|
||||
throw exceptions::forbidden_value($verbosity, "verbosity", ["silent", "quiet", "normal", "verbose", "debug"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user