From c1d68433216e631bac091a52eb6777f11805a5f4 Mon Sep 17 00:00:00 2001 From: Piotr PG Gajek Date: Sun, 24 Sep 2023 18:25:13 +0200 Subject: [PATCH] error message rename + formatting --- force-app/main/default/classes/SOQL.cls | 6 +++--- force-app/main/default/classes/SOQL_Test.cls | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/force-app/main/default/classes/SOQL.cls b/force-app/main/default/classes/SOQL.cls index d4b43ed..cb29732 100644 --- a/force-app/main/default/classes/SOQL.cls +++ b/force-app/main/default/classes/SOQL.cls @@ -1312,10 +1312,10 @@ public virtual inherited sharing class SOQL implements Queryable { public override String toString() { if (skipBinding) { - return String.format(wrapper, new List { field + ' ' + comperator + ' ' + value }); + return String.format(wrapper, new List{ field + ' ' + comperator + ' ' + value }); } - return String.format(wrapper, new List { field + ' ' + comperator + ' :' + binder.bind(value) }); + return String.format(wrapper, new List{ field + ' ' + comperator + ' :' + binder.bind(value) }); } } @@ -1369,7 +1369,7 @@ public virtual inherited sharing class SOQL implements Queryable { public void setGroupByFunction(String newGroupByFunction) { if (String.isNotEmpty(groupByFunction) && groupByFunction != newGroupByFunction) { QueryException e = new QueryException(); - e.setMessage('You cant combine GROUP BY, GROUP BY ROLLUP and GROUP BY CUBE syntax in the same statement.'); + e.setMessage('You cant use GROUP BY, GROUP BY ROLLUP and GROUP BY CUBE in the same query.'); throw e; } this.groupByFunction = newGroupByFunction; diff --git a/force-app/main/default/classes/SOQL_Test.cls b/force-app/main/default/classes/SOQL_Test.cls index 45f8b5f..4f25d74 100644 --- a/force-app/main/default/classes/SOQL_Test.cls +++ b/force-app/main/default/classes/SOQL_Test.cls @@ -1343,7 +1343,7 @@ private class SOQL_Test { // Verify Assert.areEqual( - 'You cant combine GROUP BY, GROUP BY ROLLUP and GROUP BY CUBE syntax in the same statement.', + 'You cant use GROUP BY, GROUP BY ROLLUP and GROUP BY CUBE in the same query.', queryException.getMessage() ); }