Wrap panics that occur in AndroidMkDataProviders
Annotate panics that come from an AndroidMkDataProvider with the module and variant that it was running on. Test: m checkbuild Change-Id: I4a2f32b1987dc028c446e9379a0738059e7679b1
This commit is contained in:
@@ -141,6 +141,13 @@ func translateAndroidMk(ctx SingletonContext, mkFile string, mods []Module) erro
|
||||
}
|
||||
|
||||
func translateAndroidMkModule(ctx SingletonContext, w io.Writer, mod blueprint.Module) error {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
panic(fmt.Errorf("%s in translateAndroidMkModule for module %s variant %s",
|
||||
r, ctx.ModuleName(mod), ctx.ModuleSubDir(mod)))
|
||||
}
|
||||
}()
|
||||
|
||||
provider, ok := mod.(AndroidMkDataProvider)
|
||||
if !ok {
|
||||
return nil
|
||||
|
Reference in New Issue
Block a user