fix!: handle errors properly
This commit is contained in:
@@ -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,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user