fix!: handle errors properly

This commit is contained in:
2026-02-14 20:49:08 +01:00
parent 5797059008
commit bd065eab32
6 changed files with 103 additions and 39 deletions

View File

@@ -4,5 +4,23 @@ declare(strict_types=1);
namespace Nih\CommandBuilder;
class ChildException extends CommandException
{}
/**
* A PHP error occured during an operation on a process resource.
*/
final class ChildException extends CommandException
{
public static function handleError(
int $severity,
string $message,
string $filename,
int $line,
): never {
throw new self(
message: $message,
code: 0,
severity: $severity,
filename: $filename,
line: $line,
);
}
}