Skip to content

Commit f22c1e9

Browse files
authored
Merge pull request #1774 from jdpace2/patch-2
Made exception more helpful
2 parents 8f25b2f + aae2572 commit f22c1e9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/Gedmo/SoftDeleteable/Mapping/Validator.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,11 @@ public static function validateField(ClassMetadata $meta, $field)
3838
$fieldMapping = $meta->getFieldMapping($field);
3939

4040
if (!in_array($fieldMapping['type'], self::$validTypes)) {
41-
throw new InvalidMappingException(sprintf('Field "%s" must be of one of the following types: "%s"',
41+
throw new InvalidMappingException(sprintf('Field "%s" (type "%s") must be of one of the following types: "%s" in entity %s',
42+
$field,
4243
$fieldMapping['type'],
43-
implode(', ', self::$validTypes)));
44+
implode(', ', self::$validTypes),
45+
$meta->name));
4446
}
4547
}
4648
}

0 commit comments

Comments
 (0)