Added more information to "file already loaded" warning.

Also changed it to zend_error() so it is more easily suppressed.
pull/8319/head
Joshua Haberman 4 years ago committed by Adam Cozzette
parent 76bfd89090
commit a94870872c
  1. 5
      php/ext/google/protobuf/def.c

@ -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;
}

Loading…
Cancel
Save