Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Hi sfdcfox, I did what you suggested. Basically insert first and throw in catch block. i see that in debug logs its inserting to the object.. but however end result is i dont see that record in database. we are basically throwing errors because this is backend code and we want to handle the exception in our UI. so I need to throw some exception to UI as well log a record(exception details) in this custom object..