Customer/EventListener/CustomerGroupListener.php
public function onPreDelete(ResourceEventInterface $event)
    {
        $group = $this->getCustomerGroupFromEvent($event);

        if ($group->isDefault()) {
            throw new IllegalOperationException(); // TODO reason message
        }
    }
public function onPreDelete(ResourceEventInterface $event)
    {
        $group = $this->getCustomerGroupFromEvent($event);

        if ($group->isDefault()) {
            throw new IllegalOperationException(); // TODO reason message
        }
    }
Pre delete event handler.

@param ResourceEventInterface $event

@throws IllegalOperationException