Wrap panics that occur in AndroidMkDataProviders
am: 953d3a2b28
Change-Id: Ieecee223712e3968eb0ddad6c4d4cca5596da822
This commit is contained in:
commit
f322c5f0ee
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue