From 818af3bfe0b42adada3a5cc00b49639e5991d170 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 25 Mar 2019 15:04:09 -0700 Subject: [PATCH] Fix panic message in SingletonContext.VisitAllModules The panic should be printing the module info string from the moduleInfo, not trying to Stringify the Module interface. Test: manual Change-Id: I1a2b7c15c4216518c76b909b25d50ac2eb7d1baa --- singleton_ctx.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/singleton_ctx.go b/singleton_ctx.go index 5ca8ee6..de5bae7 100644 --- a/singleton_ctx.go +++ b/singleton_ctx.go @@ -223,7 +223,7 @@ func (s *singletonContext) VisitAllModules(visit func(Module)) { defer func() { if r := recover(); r != nil { panic(newPanicErrorf(r, "VisitAllModules(%s) for module %s", - funcName(visit), visitingModule)) + funcName(visit), s.context.moduleInfo[visitingModule])) } }()