Excepciones de servicios

This commit is contained in:
Juan Pablo Vial
2025-02-24 12:41:00 -03:00
parent 28bba8a438
commit a44bd610ad
5 changed files with 75 additions and 0 deletions

View File

@ -0,0 +1,15 @@
<?php
namespace Incoviba\Exception;
use Exception;
use Throwable;
class ServiceActionFail extends Exception
{
public function __construct(string $service,string $action = "__invoke", int $code = 0, Throwable $previous = null)
{
$message = "Action {$action} failed for Service {$service}.";
$code = 700 + $code;
parent::__construct($message, $code, $previous);
}
}