You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by mg...@apache.org on 2015/11/12 21:01:46 UTC
[04/50] [abbrv] isis git commit: ISIS-830: further improvements to
error message.
ISIS-830: further improvements to error message.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/acf1860d
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/acf1860d
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/acf1860d
Branch: refs/heads/ISIS-1224-select2-v4
Commit: acf1860d678c8c04783ac76888c2f684d1278621
Parents: f1c65d0
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Wed Nov 4 15:12:29 2015 +0000
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Wed Nov 4 15:12:29 2015 +0000
----------------------------------------------------------------------
.../core/runtime/services/eventbus/EventBusServiceDefault.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/acf1860d/core/runtime/src/main/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefault.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefault.java b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefault.java
index 93aafc4..cf6a630 100644
--- a/core/runtime/src/main/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefault.java
+++ b/core/runtime/src/main/java/org/apache/isis/core/runtime/services/eventbus/EventBusServiceDefault.java
@@ -17,9 +17,12 @@
package org.apache.isis.core.runtime.services.eventbus;
import java.util.Map;
+
import javax.annotation.PostConstruct;
import javax.enterprise.context.RequestScoped;
+
import com.google.common.base.Strings;
+
import org.apache.isis.applib.NonRecoverableException;
import org.apache.isis.applib.annotation.Programmatic;
import org.apache.isis.applib.services.eventbus.EventBusImplementation;
@@ -63,7 +66,7 @@ public abstract class EventBusServiceDefault extends EventBusService {
// a singleton
if (!allowLateRegistration && hasPosted()) {
// ... coming too late to the party.
- throw new IllegalStateException("Events have already been posted; too late to register any further (singleton) subscribers. Either use @DomainServiceLayout(menuOrder=...) to ensure that subscribers are initialized before any services that might post events, or alternatively use '" + KEY_ALLOW_LATE_REGISTRATION + "' configuration property to relax this check (meaning that some subscribers will miss some posted events)");
+ throw new IllegalStateException("Attempting to register '" + domainService.getClass().getSimpleName() + "' as a subscriber. However events have already been posted and it is too late to register any further (singleton) subscribers. Either use @DomainServiceLayout(menuOrder=...) on subscribing services to ensure that subscribers are initialized before any services that might post events, or alternatively use '" + KEY_ALLOW_LATE_REGISTRATION + "' configuration property to relax this check (meaning that some subscribers will miss some posted events)");
}
}
super.register(domainService);