Added more information to "file already loaded" warning.

Also changed it to zend_error() so it is more easily suppressed.
This commit is contained in:
Joshua Haberman 2021-02-09 17:44:30 -08:00
parent 66e5185780
commit db66c95eaf

View File

@ -916,7 +916,10 @@ static void add_descriptor(DescriptorPool *pool,
if (upb_symtab_lookupfile2(pool->symtab, name.data, name.size)) {
// Already added.
fprintf(stderr, "WARNING: file was already added\n");
zend_error(E_USER_WARNING,
"proto descriptor was previously loaded (included in multiple "
"metadata bundles?): " UPB_STRVIEW_FORMAT,
UPB_STRVIEW_ARGS(name));
return;
}