int main(int argc, char **argv)
+try
{
vector<string> lines;
- try {
reportAllTypes();
reportFancyTypes();
#if __GNUC__ >= 3
num_domainsdone=1;
}
cerr<<num_domainsdone<<" domains were fully parsed, containing "<<g_numRecords<<" records\n";
+
+ return 0;
- }
- catch(PDNSException &ae) {
- cerr<<"\nFatal error: "<<ae.reason<<endl;
- return 0;
- }
- catch(std::exception &e) {
- cerr<<"died because of STL error: "<<e.what()<<endl;
- exit(0);
- }
- catch(...) {
- cerr<<"died because of unknown exception"<<endl;
- exit(0);
- }
-
+}
+catch(PDNSException &ae) {
+ cerr<<"\nFatal error: "<<ae.reason<<endl;
+ return 1;
+}
+catch(std::exception &e) {
+ cerr<<"\ndied because of STL error: "<<e.what()<<endl;
+ return 1;
+}
+catch(...) {
+ cerr<<"\ndied because of unknown exception"<<endl;
return 1;
-
}
int main(int argc, char **argv)
+try
{
- try {
reportAllTypes();
reportFancyTypes();
#if __GNUC__ >= 3
}
cerr<<num_domainsdone<<" domains were fully parsed, containing "<<g_numRecords<<" records\n";
- }
- catch(PDNSException &ae) {
- cerr<<"\nFatal error: "<<ae.reason<<endl;
- return 0;
- }
- catch(std::exception &e) {
- cerr<<"died because of STL error: "<<e.what()<<endl;
- exit(0);
- }
- catch(...) {
- cerr<<"died because of unknown exception"<<endl;
- exit(0);
- }
-
if(::arg().mustDo("transactions") && g_intransaction) {
if(g_mode != SQLITE)
cout<<"COMMIT WORK;"<<endl;
else
cout<<"COMMIT;"<<endl;
}
+ return 0;
+}
+catch(PDNSException &ae) {
+ cerr<<"\nFatal error: "<<ae.reason<<endl;
+ return 1;
+}
+catch(std::exception &e) {
+ cerr<<"\ndied because of STL error: "<<e.what()<<endl;
+ return 1;
+}
+catch(...) {
+ cerr<<"\ndied because of unknown exception"<<endl;
return 1;
-
}