You need to sign in to do that
Don't have an account?
hiteshwar marni
exception handling best practises
what are the best practises for Exception handling in salesforce.I have gone through SF Document but didn't find any where.
Thanks
Thanks
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Please check These Blogs
1-http://www.brcline.com/blog/exception-handling-in-apex
2-https://mytutorialrack.com/exception-handling-in-salesforce/
https://developer.salesforce.com/blogs/2017/09/error-handling-best-practices-lightning-apex.html
thanks
Parag Bhatt
1) Example Handling
https://developer.salesforce.com/page/An_Introduction_to_Exception_Handling
2) Exception Handling Example
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_exception_trycatch_example.htm
3) Error Handling Best Practices for Lightning and Apex
https://developer.salesforce.com/blogs/2017/09/error-handling-best-practices-lightning-apex.html
Best Practices for Exception Handling in Apex
http://www.brcline.com/blog/exception-handling-in-apex
Let us know if this will help you
There are further considerations for trying to fix an issue in code: you may expect a DMLException for, say, an insert statement, and write your code to act on this, but then you get a DMLException for an update you made earlier which you never suspected would be a problem. If there is any chance of ambiguity over this, it is best to get a notification of some sort. Either send an email out or create a custom 'exception data' object to log the problem and monitor these.
It appears that not all unhandled exceptions will result in emails. Scheduled Apex jobs do not seem to send emails when there is an unhandled exception. This probably means you need to use try/catch more in these Apex classes than you might otherwise wish.