phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE,"Non-backed enum %s cannot be serialized for field path \"%s\"",ZSTR_VAL(Z_OBJCE_P(object)->name),path_string);
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE,"Detected unsupported PHP type for field path \"%s\": %d (%s)",path_string,Z_TYPE_P(entry),zend_get_type_by_const(Z_TYPE_P(entry)));
efree(path_string);
}
}
}
/* This is based on bson_copy_to_excluding_noinit() and is necessary because
* bson_copy_to() cannot be used with a bson_t allocated with bson_new(). */
phongo_throw_exception(PHONGO_ERROR_UNEXPECTED_VALUE,"%s instance %s cannot be serialized as a root element",ZSTR_VAL(php_phongo_type_ce->name),ZSTR_VAL(Z_OBJCE_P(data)->name));