feat: implement exception handling system with error context and policies
This commit is contained in:
12
src/Framework/ExceptionHandling/Reporter/LogReporter.php
Normal file
12
src/Framework/ExceptionHandling/Reporter/LogReporter.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Framework\ExceptionHandling\Reporter;
|
||||
|
||||
final class LogReporter implements Reporter
|
||||
{
|
||||
public function report(string $message): void
|
||||
{
|
||||
echo ("[log] " . $message);
|
||||
}
|
||||
}
|
||||
8
src/Framework/ExceptionHandling/Reporter/Reporter.php
Normal file
8
src/Framework/ExceptionHandling/Reporter/Reporter.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Framework\ExceptionHandling\Reporter;
|
||||
|
||||
interface Reporter
|
||||
{
|
||||
public function report(string $message): void;
|
||||
}
|
||||
Reference in New Issue
Block a user