summaryrefslogtreecommitdiff
path: root/bin/bbackupquery/bbackupquery.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bin/bbackupquery/bbackupquery.cpp')
-rw-r--r--bin/bbackupquery/bbackupquery.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/bin/bbackupquery/bbackupquery.cpp b/bin/bbackupquery/bbackupquery.cpp
index 7726f429..90fa74b5 100644
--- a/bin/bbackupquery/bbackupquery.cpp
+++ b/bin/bbackupquery/bbackupquery.cpp
@@ -447,7 +447,15 @@ int main(int argc, const char *argv[])
{
BackupQueries::ParsedCommand cmd(
context.ParseCommand(argv[c++], true));
- context.DoCommand(cmd);
+
+ if(cmd.failed)
+ {
+ BOX_ERROR("Parse failed");
+ }
+ else
+ {
+ context.DoCommand(cmd);
+ }
}
}
@@ -492,8 +500,16 @@ int main(int argc, const char *argv[])
BackupQueries::ParsedCommand cmd(
context.ParseCommand(command, false));
- context.DoCommand(cmd);
+ if(cmd.failed)
+ {
+ BOX_ERROR("Parse failed");
+ }
+ else
+ {
+ context.DoCommand(cmd);
+ }
+
if(last_cmd != 0 && ::strcmp(last_cmd, command) == 0)
{
free(command);