<?php

namespace Kylin\Activity\Exceptions;

use Exception;

/**
 * 无法记录变更异常
 *
 * 当尝试记录无效属性的变更时抛出。
 */
class CouldNotLogChanges extends Exception
{
    public static function invalidAttribute($attribute): self
    {
        return new static("Cannot log attribute `{$attribute}`. Can only log attributes of a model or a directly related model.");
    }
}
