]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnsutil edit-zone: do not exit on ZoneParser exception 9826/head
authorYour Name <peter.van.dijk@powerdns.com>
Mon, 7 Dec 2020 17:45:33 +0000 (18:45 +0100)
committerYour Name <peter.van.dijk@powerdns.com>
Mon, 7 Dec 2020 17:46:48 +0000 (18:46 +0100)
pdns/pdnsutil.cc

index a8b1ffc577aebf65cc3cc3f2114ff1eac3514c71..99affedbccf7fc0724b236c79c26a10612331490 100644 (file)
@@ -1063,6 +1063,12 @@ static int editZone(const DNSName &zone) {
     gotoline = fnum.second;
     goto reAsk;
   }
+  catch(PDNSException& e) {
+    cerr<<"Problem: "<<e.reason<<" "<<zpt.getLineOfFile()<<endl;
+    auto fnum = zpt.getLineNumAndFile();
+    gotoline = fnum.second;
+    goto reAsk;
+  }
 
   sort(post.begin(), post.end(), DNSRecord::prettyCompare);
   checkrr.clear();