Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // USER MODULE
- abstract class RunetimeException extends \RuntimeException
- {
- }
- final class UserNotFound extends RuntimeException
- {
- public static function withEmail(string $email): self
- {
- $message = \sprintf('User cannot be found by email: %s', $email);
- return new self($message);
- }
- }
- throw UserNotFound::withEmail('patrykwozinski@github.example');
Add Comment
Please, Sign In to add comment