diff --git a/sources/Service.uc b/sources/Service.uc index 62e46bb..3c0dae3 100644 --- a/sources/Service.uc +++ b/sources/Service.uc @@ -24,6 +24,8 @@ class Service extends Singleton // Listeners listed here will be automatically activated. var public const array< class > requiredListeners; +var LoggerAPI.Definition errNoService; + // Enables feature of given class. public static final function Service Require() { @@ -35,6 +37,9 @@ public static final function Service Require() default.blockSpawning = false; newInstance = Service(__().memory.Allocate(default.class)); default.blockSpawning = true; + if (newInstance == none) { + __().logger.Auto(default.errNoService).ArgClass(default.class); + } return newInstance; } @@ -78,4 +83,5 @@ defaultproperties blockSpawning = true // Features are server-only actors remoteRole = ROLE_None + errNoService = "Cannot start required service %1." } \ No newline at end of file