<?php

namespace Velis\Model\RelationLoader\Exceptions;

use Velis\Exception;

class UndefinedRelationException extends Exception
{
    public function __construct($relationName, string $targetModel, $code = null, $previous = null, $debugInfo = null)
    {
        $message = "Relation `$relationName` is not defined for model $targetModel.";

        parent::__construct($message, $code, $previous, $debugInfo);
    }
}
