Merge "Improve the error when srcs field has the wrong type." am: 309a1acb27 am: 9b08c6021f am: 613d4cefad am: 9b44c498de

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1822025

Change-Id: I8edf7bf7189e88d7a60131f9d09d9657299bffa7
This commit is contained in:
Treehugger Robot
2021-09-14 19:03:58 +00:00
committed by Automerger Merge Worker

View File

@@ -240,7 +240,7 @@ func InitSingleSourcePrebuiltModule(module PrebuiltInterface, srcProps interface
value = value.Elem()
}
if value.Kind() != reflect.String {
panic(fmt.Errorf("prebuilt src field %q should be a string or a pointer to one but was %d %q", srcPropertyName, value.Kind(), value))
panic(fmt.Errorf("prebuilt src field %q in %T in module %s should be a string or a pointer to one but was %v", srcField, srcProps, module, value))
}
src := value.String()
if src == "" {