From b0b3aca6d9eef84cfb5e8eb8a381b78ea770542b Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 16 Jan 2026 21:28:40 +0000 Subject: [PATCH] - Fixed error throwing while building relation --- src/Repository/RelationBuilder.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Repository/RelationBuilder.php b/src/Repository/RelationBuilder.php index 7786bec..212aa3a 100644 --- a/src/Repository/RelationBuilder.php +++ b/src/Repository/RelationBuilder.php @@ -84,7 +84,8 @@ class RelationBuilder } } catch(\Throwable $e) { - throw new $e(sprintf("An error occurred while calling method from your #[Virtual] attribute in entity '%s::%s'. Caught '%s'", $this->entity::class, $name, $e->getMessage() )); + + throw new $e(sprintf("An error occurred while calling method from your #[Virtual] attribute in entity '%s::%s'. Caught '%s'", $this->entity::class, $name, $e->getMessage(), $e->getCode(), $e )); } }