Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.
    public class TestEx{
  try{
    //some code
  }catch(Exception e){
    string errmsg='';
    errmsg+=e.getmessage();
    errmsg+='\n';
    errmsg+=e.getCause();
    errmsg+='\n';
    errmsg+=e.getLineNumber();
    errmsg+='\n';
    errmsg+=e.getStackTraceString();
    log__c log= new log__c();
    log.Name='SomeName';
    log.Error_Log__c=errmsg;//long text
    insert log;
  }

}

when this code is executed in a developer org of a managed pkg, the result is as expected. But after releasing this code when this code is executed in installed org,All the methods are returning null except the getmessage() method.

share|improve this question
    
Im pretty sure that is the expected behaviour. Errors within managed packages are suppressed. You will need to raise a case with SF to get the logging turned on for managed packages. They will only enable the logging for a certain amount of time. –  BarCotter Apr 17 at 14:07

1 Answer 1

up vote 5 down vote accepted

If the package has passed security review, then the org the package is installed in can grant you login access like they would to Salesforce Support. This enables you to login via the Subscriber Tab in your LMA org to that org - and at that point, when you look in the Dev Console, you'll see the stack trace.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.