diff options
author | Thibaut Robert <thibaut.robert@gmail.com> | 2016-01-08 21:07:57 +0100 |
---|---|---|
committer | Thibaut Robert <thibaut.robert@gmail.com> | 2016-01-08 21:07:57 +0100 |
commit | c8b59adc8a566e2e82379d70caf7a289d8702594 (patch) | |
tree | 50465ae10e471ac6a7d37808c93215d5b9f00d64 | |
parent | e8fd7dfa088ea120105e6db9a7a8c68cd36f5dd2 (diff) | |
download | Kamon-c8b59adc8a566e2e82379d70caf7a289d8702594.tar.gz Kamon-c8b59adc8a566e2e82379d70caf7a289d8702594.tar.bz2 Kamon-c8b59adc8a566e2e82379d70caf7a289d8702594.zip |
= core: don't throw MathError when auto-start is disabled for a module #300
-rw-r--r-- | kamon-core/src/main/scala/kamon/ModuleLoader.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/ModuleLoader.scala b/kamon-core/src/main/scala/kamon/ModuleLoader.scala index ac0511c5..602ee819 100644 --- a/kamon-core/src/main/scala/kamon/ModuleLoader.scala +++ b/kamon-core/src/main/scala/kamon/ModuleLoader.scala @@ -35,7 +35,7 @@ private[kamon] class ModuleLoaderExtension(system: ExtendedActorSystem) extends logAspectJWeaverMissing(settings.modulesRequiringAspectJ) // Force initialization of all modules marked with auto-start. - settings.availableModules.filter(_.startInfo.nonEmpty).foreach { + settings.availableModules.foreach { case AvailableModuleInfo(name, requiresAJ, Some(ModuleStartInfo(autoStart, extensionClass))) if autoStart ⇒ system.dynamicAccess.getObjectFor[ExtensionId[Kamon.Extension]](extensionClass).map { moduleID ⇒ @@ -46,6 +46,8 @@ private[kamon] class ModuleLoaderExtension(system: ExtendedActorSystem) extends case th: Throwable ⇒ log.error(s"Failed to auto start the [$name] module.", th) } + case _ ⇒ //ignore + } // When AspectJ is present the kamon.supervisor.AspectJPresent aspect will make this return true. |