Recently I often see code like the following (this example is taken from Symfony):
protected function execute(InputInterface $input, OutputInterface $output)
{
throw new LogicException('You must override the execute() method in the concrete command class.');
}
What is the benefit here over just marking the method as abstract?
What's the benefit for the ...
- ... library author?
- ... library user?
I already found a similar question for Java (Faking abstract methods using exceptions in Java), but it wasn't very helpful as its answers are explicit guessings and opinions.