Write prettier exception messages
This commit is contained in:
parent
1d1a690e0f
commit
d9f3f875e0
|
@ -37,7 +37,7 @@ final class MDNodaLink {
|
||||||
|
|
||||||
$this->source = $source;
|
$this->source = $source;
|
||||||
if (($validatedId = $this->source->validateId(strtr(trim($id), [" " => "", "\t" => "", "\n" => ""]))) === false) {
|
if (($validatedId = $this->source->validateId(strtr(trim($id), [" " => "", "\t" => "", "\n" => ""]))) === false) {
|
||||||
throw new MDInvalidNodaLink("Invalid noda ID / link: \"" . $id . "\" [Repository: " . $this->source->toDbName() . "]");
|
throw new MDInvalidNodaLink("Invalid norm data ID / link: \"" . $id . "\" [Repository: " . $this->source->toDbName() . "]");
|
||||||
}
|
}
|
||||||
$this->id = $validatedId;
|
$this->id = $validatedId;
|
||||||
|
|
||||||
|
|
|
@ -102,7 +102,7 @@ enum MDNodaRepository implements MDValueEnumInterface, JsonSerializable {
|
||||||
'WIKIPEDIA' => self::wikidata,
|
'WIKIPEDIA' => self::wikidata,
|
||||||
'wikipedia' => self::wikipedia,
|
'wikipedia' => self::wikipedia,
|
||||||
'Wikipedia' => self::wikipedia,
|
'Wikipedia' => self::wikipedia,
|
||||||
default => throw new MDpageParameterNotFromListException("Unknown noda repository: '" . $input . "'"),
|
default => throw new MDpageParameterNotFromListException("Unknown norm data repository: '" . $input . "'"),
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user