Updated CLI commands to just print exception messages when possible

This commit is contained in:
Alejandro Celaya
2019-11-28 18:42:27 +01:00
parent d83d2f82bd
commit 5055ddf995
14 changed files with 40 additions and 97 deletions

View File

@@ -17,7 +17,7 @@ class NonUniqueSlugException extends InvalidArgumentException implements Problem
private const TITLE = 'Invalid custom slug';
private const TYPE = 'INVALID_SLUG';
public static function fromSlug(string $slug, ?string $domain): self
public static function fromSlug(string $slug, ?string $domain = null): self
{
$suffix = $domain === null ? '' : sprintf(' for domain "%s"', $domain);
$e = new self(sprintf('Provided slug "%s" is already in use%s.', $slug, $suffix));