function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ynrynr 

Apex Exception mails...

Hi All,

 

I got a question about Apex Exception emails. How can I setup apex exception emails to be sent to my account?

 

Am a developer and when I get these emails to my account, it helps me in looking specifically into where an unhandled exception has occurred and then try to fix it from there.  

 

Thanks,

YNR

Best Answer chosen by Admin (Salesforce Developers) 
BulentBulent
If an Apex script has a bug or does not catch a script-level exception:
  • The end user sees a simple explanation of the problem in the application interface. This error message includes the Apex stack trace.
  • The developer specified in the LastModifiedBy field receives the error via email with the Apex stack trace and the customer's organization and user ID. No other customer data is returned with the report.

All Answers

BulentBulent
If an Apex script has a bug or does not catch a script-level exception:
  • The end user sees a simple explanation of the problem in the application interface. This error message includes the Apex stack trace.
  • The developer specified in the LastModifiedBy field receives the error via email with the Apex stack trace and the customer's organization and user ID. No other customer data is returned with the report.
This was selected as the best answer
daveespodaveespo

I receive the emails from the orgs that have installed my Managed Package whenever there is an unhandled exception. However, the stack trace nor line number of the error is included. This basically makes the email useless since I have no hope of knowing which method is failing.

 

See below:

 

Apex script unhandled exception by user/organization: xxx/yyy

Visualforce Page: /apex/xxx__processticketorder



caused by: System.QueryException: List has no rows for assignment to SObject

(XYZTicket)

External entry point

Debug Log:

 

Message Edited by daveespo on 02-18-2010 01:25 PM