Salesforce Exception Collections Internal Error
February 19, 2016

Salesforce Exception Collections Internal Error

We had some legacy code which was storing exceptions happening during future methods into Salesforce custom object.
This tool had some code which was converting a single exception into a list and then iteration over the list was performed.

This issue could be reproduced by the following snippet:

try {
String testString;
Boolean testBool = testString.startsWith( 'text' );
} catch ( Exception e ) {
for ( System.Exception anExToLog : new List{ e } ) {
System.debug(LoggingLevel.ERROR, '@@@ anExToLog: ' + anExToLog );
}
}

When we tried to execute this code, the following exception was raised:

System.QueryException: Dynamic query yields incompatible SObject type System.NullPointerException for loop variable of type java.lang.Exception

We have opened a ticket against Salesforce support on 9th of February.

Finally today, in about two weeks, Salesforce has acknowledged this as an issue and provided a link for us to click “This issue affects me” to get email alert when the issue is fixed. If this issue affects you then you can also subscribe to it.

If you notice some other internal error issue then you can also open Salesforce support ticket by being logged in to Salesforce. 

Tags



Share


Recent Articles

Women Driving Tech.
Interview with Intelligent, Classy, Ambitious and Inspirational Technologists.

April 18, 2019

We start a new blog series highlighting female forward-thinking technologists leading the way to innovations. The ladies of CoreValue are a part of European Women in Tech, and they regularly meet exceptional women at technology conferences and summits who shape the industry landscape and inspire others. Motivated by talking to the leading women in the […]

Migrate from Aura to Lightning Web Components to Increase Performance

April 12, 2019 | Bohdan Dovhan, Senior Salesforce Engineer

Salesforce cloud platform provides customers with the whole variety of options for customization. Those include point-and-click tools like Lightning App Builder, Process Builder, Visual Flow and Workflow, and development tools like Apex, Visualforce, Lightning Aura Components, Lightning Aura Events, Lightning Aura Tokens, Lightning Aura Standalone application and Lightning Web Components. While reading this list you […]

Contact Us

By submitting this form you acknowledge that you agreed to our Cookies and Privacy Policy.