Add explicit log (Rather than NPE) for unknown table name

This commit is contained in:
2025-01-16 10:24:25 -06:00
parent d6288eee4a
commit 109e390bc3

View File

@ -533,11 +533,17 @@ public class QueryStatManager
////////////////////////
if(getOutput.getRecord() == null)
{
QTableMetaData tableMetaData = getInstance().qInstance.getTable(tableName);
if(tableMetaData == null)
{
LOG.info("No such table", logPair("tableName", tableName));
return (null);
}
///////////////////////////////////////////////////////
// insert the record (into the table, not the cache) //
///////////////////////////////////////////////////////
QTableMetaData tableMetaData = getInstance().qInstance.getTable(tableName);
InsertInput insertInput = new InsertInput();
InsertInput insertInput = new InsertInput();
insertInput.setTableName(QQQTable.TABLE_NAME);
insertInput.setRecords(List.of(new QRecord().withValue("name", tableName).withValue("label", tableMetaData.getLabel())));
InsertOutput insertOutput = new InsertAction().execute(insertInput);