Handled exceptions thrown by entity converter

This commit is contained in:
2017-07-13 03:24:02 -07:00
parent 1835dccf8b
commit 34cd34df8f

View File

@ -7,6 +7,7 @@
#include <sstream> #include <sstream>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#include <exception>
#include "cxxopts.hpp" #include "cxxopts.hpp"
@ -112,7 +113,11 @@ void convert_entities(const cxxopts::Options &o, const vector<vector<string> > &
fn = &brushdef_gtk; fn = &brushdef_gtk;
} }
for (const vector<string> &entity : q) { for (const vector<string> &entity : q) {
write(entity, fout, fn, e); try {
write(entity, fout, fn, e);
} catch (exception &e) {
cerr << e.what() << endl;
}
} }
} }