From f1ce906d1e29b25a82c41e7c8f2b94cf04ed37a2 Mon Sep 17 00:00:00 2001 From: jensp Date: Wed, 6 Nov 2013 07:01:23 +0000 Subject: [PATCH] =?UTF-8?q?Einige=20kleinere=20=C3=84nderungen=20um=20das?= =?UTF-8?q?=20Analysieren=20von=20Fehlern=20insbesondere=20beim=20Ausf?= =?UTF-8?q?=C3=BChren=20der=20CLI-Wartungsprogramme=20zu=20unterst=C3=BCtz?= =?UTF-8?q?en?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@2415 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/domain/DomainObjectTraversal.java | 12 ++++++++++-- ccm-core/src/log4j.properties | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java b/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java index 2975504f2..b49ead062 100755 --- a/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java +++ b/ccm-core/src/com/arsdigita/domain/DomainObjectTraversal.java @@ -114,7 +114,11 @@ public abstract class DomainObjectTraversal { public static void registerAdapter(final String type, final DomainObjectTraversalAdapter adapter, final String context) { - registerAdapter(SessionManager.getMetadataRoot().getObjectType(type), + final ObjectType objectType = SessionManager.getMetadataRoot().getObjectType(type); + if (objectType == null) { + throw new IllegalArgumentException(String.format("Can't find object type '%s'", type)); + } + registerAdapter(objectType, adapter, context); } @@ -127,7 +131,11 @@ public abstract class DomainObjectTraversal { */ public static void unregisterAdapter(final String type, final String context) { - unregisterAdapter(SessionManager.getMetadataRoot().getObjectType(type), + final ObjectType objectType = SessionManager.getMetadataRoot().getObjectType(type); + if (objectType == null) { + throw new IllegalArgumentException(String.format("Can't find object type '%s'", type)); + } + unregisterAdapter(objectType, context); } diff --git a/ccm-core/src/log4j.properties b/ccm-core/src/log4j.properties index 31cf59d5f..052d33f8d 100755 --- a/ccm-core/src/log4j.properties +++ b/ccm-core/src/log4j.properties @@ -33,7 +33,7 @@ log4j.logger.com.arsdigita.web.CCMApplicationContextListener=INFO # For seeing progress of main runtime initialization process log4j.logger.com.arsdigita.runtime.CCMResourceManager=INFO -#log4j.logger.com.arsdigita.runtime.Runtime=INFO +log4j.logger.com.arsdigita.runtime.Runtime=INFO log4j.logger.com.arsdigita.bundle.Loader=INFO