Kouhei Sutou
null+****@clear*****
Sat Feb 20 18:31:37 JST 2016
Kouhei Sutou 2016-02-20 18:31:37 +0900 (Sat, 20 Feb 2016) New Revision: 49c3a9bbe47def26cd519bbcb99c6824724089a4 https://github.com/groonga/groonga/commit/49c3a9bbe47def26cd519bbcb99c6824724089a4 Message: Use "<...>" for showing input Modified files: lib/grn_ecmascript.lemon lib/proc/proc_snippet.c Modified: lib/grn_ecmascript.lemon (+9 -8) =================================================================== --- lib/grn_ecmascript.lemon 2016-02-20 18:30:08 +0900 (d4abdac) +++ lib/grn_ecmascript.lemon 2016-02-20 18:31:37 +0900 (bc968cb) @@ -275,7 +275,7 @@ unary_expression ::= INCR unary_expression. { grn_expr_dfi_put(ctx, e, dfi_->type, dfi_->domain, dfi_->code); if (const_p) { ERR(GRN_SYNTAX_ERROR, - "constant can't be incremented (%.*s)", + "constant can't be incremented: <%.*s>", (int)(efsi->str_end - efsi->str), efsi->str); } else { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR, 1); @@ -292,7 +292,7 @@ unary_expression ::= DECR unary_expression. { grn_expr_dfi_put(ctx, e, dfi_->type, dfi_->domain, dfi_->code); if (const_p) { ERR(GRN_SYNTAX_ERROR, - "constant can't be decremented (%.*s)", + "constant can't be decremented: <%.*s>", (int)(efsi->str_end - efsi->str), efsi->str); } else { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR, 1); @@ -335,7 +335,7 @@ postfix_expression ::= lefthand_side_expression INCR. { grn_expr_dfi_put(ctx, e, dfi_->type, dfi_->domain, dfi_->code); if (const_p) { ERR(GRN_SYNTAX_ERROR, - "constant can't be incremented (%.*s)", + "constant can't be incremented: <%.*s>", (int)(efsi->str_end - efsi->str), efsi->str); } else { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR_POST, 1); @@ -352,7 +352,7 @@ postfix_expression ::= lefthand_side_expression DECR. { grn_expr_dfi_put(ctx, e, dfi_->type, dfi_->domain, dfi_->code); if (const_p) { ERR(GRN_SYNTAX_ERROR, - "constant can't be decremented (%.*s)", + "constant can't be decremented: <%.*s>", (int)(efsi->str_end - efsi->str), efsi->str); } else { grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR_POST, 1); @@ -416,7 +416,8 @@ property_name_and_value ::= property_name COLON assignment_expression. { if (!efsi->hash_args) { ERR(GRN_NO_MEMORY_AVAILABLE, - "couldn't create hash table for parsing object literal arguments (%.*s)", + "couldn't create hash table for parsing object literal arguments: " + "<%.*s>", (int)(efsi->str_end - efsi->str), efsi->str); } else { grn_obj *buf; @@ -433,8 +434,8 @@ property_name_and_value ::= property_name COLON assignment_expression. { GRN_TEXT_INIT(&inspected, 0); grn_inspect(ctx, &inspected, property); ERR(GRN_INVALID_ARGUMENT, - "same property has already been specified (%.*s)", - (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected)); + "same property has already been specified: <%.*s>", + (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected)); GRN_OBJ_FIN(ctx, &inspected); GRN_HASH_EACH(ctx, efsi->hash_args, i, NULL, NULL, (void **)&obj, { GRN_OBJ_FIN(ctx, obj); @@ -448,7 +449,7 @@ property_name_and_value ::= property_name COLON assignment_expression. { GRN_TEXT_INIT(&inspected, 0); grn_inspect(ctx, &inspected, value); ERR(GRN_NO_MEMORY_AVAILABLE, - "failed parse object literal arguments (%.*s)", + "failed parse object literal arguments: <%.*s>", (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected)); GRN_OBJ_FIN(ctx, &inspected); GRN_HASH_EACH(ctx, efsi->hash_args, i, NULL, NULL, (void **)&obj, { Modified: lib/proc/proc_snippet.c (+3 -2) =================================================================== --- lib/proc/proc_snippet.c 2016-02-20 18:30:08 +0900 (04d16d9) +++ lib/proc/proc_snippet.c 2016-02-20 18:31:37 +0900 (df09f35) @@ -232,7 +232,8 @@ func_snippet_full(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_d default_close_tag = GRN_TEXT_VALUE(value); default_close_tag_length = GRN_TEXT_LEN(value); } else { - GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, "invalid option name: %.*s", + GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, + "invalid option name: <%.*s>", key_size, (char *)key); grn_hash_cursor_close(ctx, cursor); goto exit; @@ -274,7 +275,7 @@ func_snippet_full(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_d GRN_TEXT_INIT(&inspected, 0); grn_inspect(ctx, &inspected, normalizer); GRN_PLUGIN_ERROR(ctx, GRN_INVALID_ARGUMENT, - "[snippet_full] not normalizer: %.*s", + "[snippet_full] not normalizer: <%.*s>", (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected)); GRN_OBJ_FIN(ctx, &inspected); -------------- next part -------------- HTML����������������������������...Download