Mostrar reservas
This commit is contained in:
@ -2,7 +2,9 @@
|
||||
namespace Incoviba\Common\Implement\Repository;
|
||||
|
||||
use Closure;
|
||||
use Exception;
|
||||
use Incoviba\Common\Define;
|
||||
use Incoviba\Common\Implement\Exception\EmptyResult;
|
||||
|
||||
class Factory implements Define\Repository\Factory
|
||||
{
|
||||
@ -20,8 +22,16 @@ class Factory implements Define\Repository\Factory
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
* @throws EmptyResult
|
||||
*/
|
||||
public function run(): mixed
|
||||
{
|
||||
return call_user_func_array($this->callable, $this->args);
|
||||
try {
|
||||
return call_user_func_array($this->callable, $this->args);
|
||||
} catch (Exception $exception) {
|
||||
throw new EmptyResult($exception->getMessage(), $exception);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user