NotCallable.php

<?php

namespace Lia\Exception;

class NotCallable extends Base {

    public function __construct($nonCallback){
        $type = gettype($nonCallback);
        $trace = $this->getTrace();
        $class = $trace[0]['class'];
        $func = $trace[0]['function'];


        $message = "You passed a '{$type}' to '{$class}::{$func}' instead of a callable.\n";

        parent::__construct($message);
    }
}