chore: complete update
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class DirectoryCreateException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $directory,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Ordner '$directory' konnte nicht angelegt werden.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['directory' => $directory]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class DirectoryListException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $directory,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Fehler beim Auslesen des Verzeichnisses '$directory'.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['directory' => $directory]
|
||||
);
|
||||
}
|
||||
}
|
||||
27
src/Framework/Filesystem/Exceptions/FileCopyException.php
Normal file
27
src/Framework/Filesystem/Exceptions/FileCopyException.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileCopyException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $source,
|
||||
string $destination,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Fehler beim Kopieren von '$source' nach '$destination'.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: [
|
||||
'source' => $source,
|
||||
'destination' => $destination
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
23
src/Framework/Filesystem/Exceptions/FileDeleteException.php
Normal file
23
src/Framework/Filesystem/Exceptions/FileDeleteException.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileDeleteException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $path,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Fehler beim Löschen der Datei '$path'.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['path' => $path]
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileMetadataException extends FrameworkException
|
||||
{
|
||||
public function __construct(string $path, ?\Throwable $previous = null)
|
||||
{
|
||||
parent::__construct("Konnte Metadaten für Datei '{$path}' nicht lesen", 0, $previous);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileNotFoundException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $path,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Datei '$path' nicht gefunden.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['path' => $path]
|
||||
);
|
||||
}
|
||||
}
|
||||
23
src/Framework/Filesystem/Exceptions/FileReadException.php
Normal file
23
src/Framework/Filesystem/Exceptions/FileReadException.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileReadException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $path,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Lesefehler bei '$path'.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['path' => $path]
|
||||
);
|
||||
}
|
||||
}
|
||||
23
src/Framework/Filesystem/Exceptions/FileWriteException.php
Normal file
23
src/Framework/Filesystem/Exceptions/FileWriteException.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\Filesystem\Exceptions;
|
||||
|
||||
use App\Framework\Exception\FrameworkException;
|
||||
|
||||
final class FileWriteException extends FrameworkException
|
||||
{
|
||||
public function __construct(
|
||||
string $path,
|
||||
int $code = 0,
|
||||
?\Throwable $previous = null
|
||||
) {
|
||||
parent::__construct(
|
||||
message: "Fehler beim Schreiben in '$path'.",
|
||||
code: $code,
|
||||
previous: $previous,
|
||||
context: ['path' => $path]
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user