diff options
Diffstat (limited to 'src/apps/projinfo.cpp')
| -rw-r--r-- | src/apps/projinfo.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/apps/projinfo.cpp b/src/apps/projinfo.cpp index 404007e5..8b6acf54 100644 --- a/src/apps/projinfo.cpp +++ b/src/apps/projinfo.cpp @@ -1339,9 +1339,15 @@ int main(int argc, char **argv) { if (dumpDbStructure) { assert(dbContext); - const auto structure = dbContext->getDatabaseStructure(); - for (const auto &sql : structure) { - std::cout << sql << std::endl; + try { + const auto structure = dbContext->getDatabaseStructure(); + for (const auto &sql : structure) { + std::cout << sql << std::endl; + } + } catch (const std::exception &e) { + std::cerr << "ERROR: getDatabaseStructure() failed: " << e.what() + << std::endl; + std::exit(1); } } |
