Masafumi Yokoyama
null+****@clear*****
Thu Feb 11 22:22:03 JST 2016
Masafumi Yokoyama 2016-02-11 22:22:03 +0900 (Thu, 11 Feb 2016) New Revision: b39a2314007d73c2bd68105a919b96cd4cbd84c2 https://github.com/groonga/groonga/commit/b39a2314007d73c2bd68105a919b96cd4cbd84c2 Merged 4276b02: Merge pull request #475 from groonga/column-remove-show-more-detail-in-error-message Message: column_remove: show more detail in error message Added files: test/command/suite/column_remove/nonexistent.expected test/command/suite/column_remove/nonexistent.test Modified files: lib/proc.c Modified: lib/proc.c (+5 -2) =================================================================== --- lib/proc.c 2016-02-11 22:06:08 +0900 (c7721af) +++ lib/proc.c 2016-02-11 22:22:03 +0900 (26e1bf0) @@ -1437,10 +1437,13 @@ proc_column_remove(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_ if (col) { grn_obj_remove(ctx, col); } else { - ERR(GRN_INVALID_ARGUMENT, "column not found."); + ERR(GRN_INVALID_ARGUMENT, "[column][remove] column isn't found: <%.*s.%.*s>", + (int)GRN_TEXT_LEN(VAR(0)), GRN_TEXT_VALUE(VAR(0)), + (int)GRN_TEXT_LEN(VAR(1)), GRN_TEXT_VALUE(VAR(1))); } } else { - ERR(GRN_INVALID_ARGUMENT, "table not found."); + ERR(GRN_INVALID_ARGUMENT, "[column][remove] table isn't found: <%.*s>", + (int)GRN_TEXT_LEN(VAR(0)), GRN_TEXT_VALUE(VAR(0))); } GRN_OUTPUT_BOOL(!ctx->rc); return NULL; Added: test/command/suite/column_remove/nonexistent.expected (+8 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/column_remove/nonexistent.expected 2016-02-11 22:22:03 +0900 (e07614e) @@ -0,0 +1,8 @@ +column_remove Users name +[[[-22,0.0,0.0],"[column][remove] table isn't found: <Users>"],false] +#|e| [column][remove] table isn't found: <Users> +table_create Users TABLE_PAT_KEY ShortText +[[0,0.0,0.0],true] +column_remove Users name +[[[-22,0.0,0.0],"[column][remove] column isn't found: <Users.name>"],false] +#|e| [column][remove] column isn't found: <Users.name> Added: test/command/suite/column_remove/nonexistent.test (+4 -0) 100644 =================================================================== --- /dev/null +++ test/command/suite/column_remove/nonexistent.test 2016-02-11 22:22:03 +0900 (90e7b5c) @@ -0,0 +1,4 @@ +column_remove Users name + +table_create Users TABLE_PAT_KEY ShortText +column_remove Users name -------------- next part -------------- HTML����������������������������...Download