Skip to content

Commit 1e94555

Browse files
committed
CDRIVER-1919 warning in mongoc-cursor.c
1 parent 6201933 commit 1e94555

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mongoc/mongoc-cursor.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -898,7 +898,9 @@ _mongoc_cursor_flags (mongoc_cursor_t *cursor,
898898
*flags = MONGOC_QUERY_NONE;
899899

900900
if (!bson_iter_init (&iter, &cursor->opts)) {
901-
OPT_BSON_ERR ("Invalid 'opts' parameter.");
901+
bson_set_error (&cursor->error, MONGOC_ERROR_BSON,
902+
MONGOC_ERROR_BSON_INVALID, "Invalid 'opts' parameter.");
903+
return false;
902904
}
903905

904906
while (bson_iter_next (&iter)) {

0 commit comments

Comments
 (0)