Skip to content

v0.2.50..v0.2.51 changeset ChangesetDeriveCmd.cpp

Garret Voltz edited this page Jan 15, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/cmd/ChangesetDeriveCmd.cpp b/hoot-core/src/main/cpp/hoot/core/cmd/ChangesetDeriveCmd.cpp
index 9fd7379..b7fcacd 100644
--- a/hoot-core/src/main/cpp/hoot/core/cmd/ChangesetDeriveCmd.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/cmd/ChangesetDeriveCmd.cpp
@@ -62,6 +62,7 @@ public:
       printStats = true;
       args.removeAll("--stats");
     }
+    LOG_VARD(printStats);
 
     if (args.size() < 3 || args.size() > 4)
     {
@@ -78,10 +79,17 @@ public:
       if (args.size() != 4)
       {
         std::cout << getHelp() << std::endl << std::endl;
-        throw HootException(QString("%1 with SQL output takes four parameters.").arg(getName()));
+        throw IllegalArgumentException(
+          QString("%1 with SQL changeset output takes four parameters.").arg(getName()));
       }
       osmApiDbUrl = args[3];
     }
+    else if (args.size() > 3)
+    {
+      std::cout << getHelp() << std::endl << std::endl;
+      throw IllegalArgumentException(
+        QString("%1 with output: " + output + " takes three parameters.").arg(getName()));
+    }
 
     ChangesetCreator(printStats, osmApiDbUrl).create(output, input1, input2);
 
Clone this wiki locally