add class information to exception
authorKatja Luther <k.luther@bgbm.org>
Thu, 18 Feb 2021 14:03:05 +0000 (15:03 +0100)
committerKatja Luther <k.luther@bgbm.org>
Thu, 18 Feb 2021 14:03:05 +0000 (15:03 +0100)
eu.etaxonomy.taxeditor.cdmlib/src/main/java/org/hibernate/collection/internal/AbstractPersistentCollection.java

index 267e8ca3a9caecd8d9eb5575dd9daa5320f44bf6..08a6b45ea9977f9d960a470bca02aee513511521 100644 (file)
@@ -1403,6 +1403,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
                if (getOwner() != null && !initialized) {
                    Object collectionType = null;
                    Field field = null;
+                   Class<?> clazz = null;
                        try {
                                String role = getRole();
                                String fieldName = role.substring(role.lastIndexOf(".") + 1);
@@ -1442,8 +1443,7 @@ public abstract class AbstractPersistentCollection implements Serializable, Pers
                                }
                        } catch (Exception ex) {
                            String originalMessage = ex.getMessage();
-
-                           String message = originalMessage + " - field: " + field + " - collectionType: " + collectionType.toString();
+                           String message = originalMessage + "clazz: " + clazz.getSimpleName()+ "- field: " + field + " - collectionType: " + collectionType.toString();
                            throw new CdmEagerLoadingException(message);
                        }
                }