Excepciones de servicios
This commit is contained in:
15
app/src/Exception/ServiceActionFail.php
Normal file
15
app/src/Exception/ServiceActionFail.php
Normal 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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user