diff --git a/framework/db/ActiveRecord.php b/framework/db/ActiveRecord.php index 16c3f77..bf1f622 100644 --- a/framework/db/ActiveRecord.php +++ b/framework/db/ActiveRecord.php @@ -1124,8 +1124,8 @@ class ActiveRecord extends Model return $relation; } } catch (UnknownMethodException $e) { + throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".'); } - throw new InvalidParamException(get_class($this) . ' has no relation named "' . $name . '".'); } /**