Skip to content

Instantly share code, notes, and snippets.

@kokamvd
Created October 17, 2022 08:39
Show Gist options
  • Save kokamvd/ebd6bd14d5a485f79bee7e280c9d625d to your computer and use it in GitHub Desktop.
Save kokamvd/ebd6bd14d5a485f79bee7e280c9d625d to your computer and use it in GitHub Desktop.
Exception example
<?php
namespace App\Containers\AppSection\Branch\Exceptions;
use App\Ship\Parents\Exceptions\Exception as ParentException;
use Symfony\Component\HttpFoundation\Response;
class ExampleException extends ParentException
{
protected $code = Response::HTTP_NOT_FOUND;
protected string $scope = 'E_EXAMPLE';
protected string $textCode = 'E_EXAMPLE_TEXT_CODE';
protected ?string $text = 'Example exception message text or localization key';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment