- Add DISCOVERY_LOG_LEVEL=debug - Add DISCOVERY_SHOW_PROGRESS=true - Temporary changes for debugging InitializerProcessor fixes on production
31 lines
978 B
PHP
31 lines
978 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Framework\Exception;
|
|
|
|
final class DirectoryCreateException extends FrameworkException
|
|
{
|
|
public function __construct(
|
|
string $directory,
|
|
int $code = 0,
|
|
?\Throwable $previous = null
|
|
) {
|
|
$context = ExceptionContext::forOperation('filesystem.create_directory', 'FileSystem')
|
|
->withData([
|
|
'directory' => $directory,
|
|
'permissions' => is_dir(dirname($directory)) ? decoct(fileperms(dirname($directory))) : 'unknown',
|
|
'parent_exists' => is_dir(dirname($directory)),
|
|
'parent_writable' => is_writable(dirname($directory)),
|
|
'disk_free_space' => disk_free_space(dirname($directory)),
|
|
]);
|
|
|
|
parent::__construct(
|
|
message: "Ordner '$directory' konnte nicht angelegt werden.",
|
|
code: $code,
|
|
previous: $previous,
|
|
context: $context
|
|
);
|
|
}
|
|
}
|