Grammar: Show antlr error message where possible

When catching an exception thrown by antlr print all the information
which has been provided.
This commit is contained in:
Martin Kleusberg
2014-08-15 12:23:51 +02:00
parent cf0213cd7e
commit b754284073

View File

@@ -145,6 +145,10 @@ Table Table::parseSQL(const QString &sSQL)
CreateTableWalker ctw(parser.getAST());
return ctw.table();
}
catch(antlr::ANTLRException& ex)
{
qCritical() << "Sqlite parse error: " << QString::fromStdString(ex.toString()) << "(" << sSQL << ")";
}
catch(...)
{
qCritical() << "Sqlite parse error: " << sSQL; //TODO