ovsdb: Improve error message for transaction that uses unknown operation.
authorBen Pfaff <blp@nicira.com>
Fri, 6 Nov 2009 23:33:25 +0000 (15:33 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 6 Nov 2009 23:34:01 +0000 (15:34 -0800)
Without this commit, misspelling an operation name provokes a mysterious
error message.

ovsdb/execution.c

index 25b34b196fcbd7528cc96edca39afe3d114b4eb5..f3e9172603ab7ce8ff761233e5409eabfc5c3a90 100644 (file)
@@ -133,8 +133,8 @@ ovsdb_execute(struct ovsdb *db, const struct json *params,
             if (executor) {
                 error = executor(&x, &parser, result);
             } else {
-                error = ovsdb_syntax_error(operation, "unknown operation",
-                                           "No operation \"%s\"", op_name);
+                ovsdb_parser_raise_error(&parser, "No operation \"%s\"",
+                                         op_name);
             }
         } else {
             assert(ovsdb_parser_has_error(&parser));