Catch aggregation query errors
This commit is contained in:
parent
99b62edcbd
commit
c9786ee3f6
@ -95,7 +95,14 @@ module.exports = class AggregationMapConfigAdapter {
|
||||
|
||||
const sqlQueryWrap = layer.options.sql_wrap;
|
||||
|
||||
let aggregationSql = mapConfig.getAggregatedQuery(index);
|
||||
let aggregationSql;
|
||||
|
||||
try {
|
||||
aggregationSql = mapConfig.getAggregatedQuery(index);
|
||||
}
|
||||
catch (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
if (sqlQueryWrap) {
|
||||
aggregationSql = sqlQueryWrap.replace(/<%=\s*sql\s*%>/g, aggregationSql);
|
||||
|
Loading…
Reference in New Issue
Block a user