<?php


namespace AutoAdmin\Bundle\Content\Routing\Exception;


use Exception;

class NullContentRoutingException extends Exception
{
    public function __construct($content = null)
    {
        if ($content) {
           $message = sprintf('The entity "%s" with id "%s" has null content.', get_class($content), $content->getId());
        } else {
            $message = 'Could not route "null" content provided (content is null or current _tr is null).';
        }
        parent::__construct($message);
    }
}
