1

I have a simple code below in a managed package

try {
  //some code here
} catch(Exception ex) {
  log__c log = new log__c();
  log.stackTrace__c = log.getStackTraceString(); 
  log.message_c = log.getMessage();
  insert log;
}

But in subscriber org, stack trace string is always null, can someone please confirm if is there anyway to get stacktracestring from managed package and store it in custom object. in real time I am using a platform event and trigger on same to capture details.

1 Answer 1

2

No, there is not. You'll want to vote on this idea.

4
  • So there is no way to get at least the class name and method name?
    – gs650x
    Commented May 29, 2020 at 16:57
  • @gs650x As far as I'm aware, no, you cannot.
    – sfdcfox
    Commented May 29, 2020 at 17:01
  • Okay, thank you for your response :(
    – gs650x
    Commented May 29, 2020 at 17:47
  • It's 2022. there still isn't. Maybe in 2032 Commented Nov 23, 2022 at 15:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .