Print error message if parsing predicate after '='
This commit is contained in:
parent
0e1c6115b3
commit
1c93a7355f
3 changed files with 32 additions and 0 deletions
|
|
@ -563,6 +563,9 @@ void instance_t::automated_xact_directive(char * line)
|
|||
expr_t::ptr_op_t expr =
|
||||
query.parse_args(string_value(skip_ws(line + 1)).to_sequence(),
|
||||
keeper, false, true);
|
||||
if (!expr) {
|
||||
throw parse_error(_("Expected predicate after '='"));
|
||||
}
|
||||
|
||||
unique_ptr<auto_xact_t> ae(new auto_xact_t(predicate_t(expr, keeper)));
|
||||
ae->pos = position_t();
|
||||
|
|
|
|||
12
test/regress/1182_1.test
Normal file
12
test/regress/1182_1.test
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
=
|
||||
2000/01/01 Test
|
||||
A $1.00
|
||||
B
|
||||
|
||||
test bal -> 1
|
||||
__ERROR__
|
||||
While parsing file "$FILE", line 1:
|
||||
While parsing automated transaction:
|
||||
> =
|
||||
Error: Expected predicate after '='
|
||||
end test
|
||||
17
test/regress/1182_2.test
Normal file
17
test/regress/1182_2.test
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
2000/01/01 Test
|
||||
A $1.00
|
||||
B
|
||||
|
||||
============
|
||||
|
||||
2000/01/02 Test
|
||||
A $1.00
|
||||
B
|
||||
|
||||
test bal -> 1
|
||||
__ERROR__
|
||||
While parsing file "$FILE", line 5:
|
||||
While parsing automated transaction:
|
||||
> ============
|
||||
Error: Expected predicate after '='
|
||||
end test
|
||||
Loading…
Add table
Reference in a new issue