@Override
	public QueryResponseRecord query(BSimQuery<?> query) {

		lasterror = null;
		try {
			if (!(query instanceof CreateDatabase) && !(query instanceof DropDatabase) &&
				!initialize()) {
				lasterror = new BSimError(ErrorCategory.Nodatabase, "The database does not exist");
				return null;
			}

			query.buildResponseTemplate();
			QueryResponseRecord response = doQuery(query, db);
			if (response == null) {
				lasterror = new BSimError(ErrorCategory.Fatal, "Unknown query type");
				query.clearResponse();
			}
		}
		catch (DatabaseNonFatalException err) {
			lasterror = new BSimError(ErrorCategory.Nonfatal,
				"Skipping -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		catch (LSHException err) {
			lasterror = new BSimError(ErrorCategory.Fatal,
				"Fatal error during -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		catch (SQLException err) {
			lasterror = new BSimError(ErrorCategory.Fatal,
				"SQL error during -" + query.getName() + "- : " + err.getMessage());
			query.clearResponse();
		}
		return query.getResponse();
	}
For every function currently in the manager, fill in its call graph information
@param manage the executable descriptor
@throws LSHException if the database does not track call graph information
@throws SQLException if there is a problem querying for function information
Ghidra/Features/BSim/src/main/java/ghidra/features/bsim/query/client/AbstractSQLFunctionDatabase.java