From 22e594fd6bd2742f3cac9732b5187a5f2734f23e Mon Sep 17 00:00:00 2001 From: FishOfPrey Date: Thu, 10 Oct 2019 21:40:02 +1300 Subject: [PATCH] The SFDCAccessControlException wasn't setting the exception message. This resulted in the message being 'Script-thrown exception'. Explicitly call the Exception constructor to set the message. --- src/classes/SFDCAccessControlException.cls | 1 + 1 file changed, 1 insertion(+) diff --git a/src/classes/SFDCAccessControlException.cls b/src/classes/SFDCAccessControlException.cls index 185e402..455cb50 100644 --- a/src/classes/SFDCAccessControlException.cls +++ b/src/classes/SFDCAccessControlException.cls @@ -89,6 +89,7 @@ global with sharing class SFDCAccessControlException extends Exception { * @param eField The field name this error was triggered on */ global SFDCAccessControlException(String eText, ExceptionType eType, ExceptionReason eReason, String eObject, String eField) { + this(eText + ' ' + eType + ' ' + eReason + ' ' + eObject + ' ' + eField); this.eText = eText; this.eType = eType; this.eReason = eReason;