Log viewer doesn't hyperlink to class line where exception thrown

Issue #1956 resolved
Eric Kintzer created an issue

The screen shot says it all – the stacktrace identifies the line in question but there’s no hyperlink to the class line.

I have a suspicion that this hyperlinking error is caused by the line 14 in question (see below) includes a method mocked by the StubAPI.

Map<Id,Order> ordsById = new Map<Id,Order> (OrdersSelector.newInstance()
                .selectWithParentsAndItemsById(getOrderIds(newToTxnCancels)));

OrderSelector is mocked by StubAPI and returned, for the testmethod’s execution null which then caused the exception

Actually, the above may be a red herring as after fixing my testmethod, I then got a new error where the log viewer hyperlink was not going to a line in an inner class (something I saw you had fixed in 2019)

Comments (7)

  1. Scott Wells repo owner

    Eric, IC2 hyperlinks based on pattern-based recognition in lines written to console views. It specifically looks for lines that (ignoring whitespace) start with Class. or Trigger., plus a few other known patterns. In this case it looks like Salesforce has changed some of the stack trace output to include a Stacktrace: prefix. I can certainly update the patterns to accommodate for that. It's just always fun to be chasing a moving target...

  2. Log in to comment