Navigation Menu

Skip to content

Commit

Permalink
grn_table_size: improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 12, 2018
1 parent 5c75f04 commit 6a8b2b1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/db.c
Expand Up @@ -2478,11 +2478,14 @@ grn_table_size(grn_ctx *ctx, grn_obj *table)
n = grn_array_size(ctx, (grn_array *)table);
break;
default :
ERR(GRN_INVALID_ARGUMENT, "not supported");
ERR(GRN_INVALID_ARGUMENT,
"[table][size] must be table or DB: <%s>(%u)",
grn_obj_type_to_string(table->header.type),
table->header.type);
break;
}
} else {
ERR(GRN_INVALID_ARGUMENT, "invalid table assigned");
ERR(GRN_INVALID_ARGUMENT, "[table][size] must not NULL");
}
GRN_API_RETURN(n);
}
Expand Down

0 comments on commit 6a8b2b1

Please sign in to comment.