Skip to main content
Exception handling

Enforce the presence of a try/catch block to handle possible exceptions around DML statements.

Lorenzo Frattini avatar
Written by Lorenzo Frattini
Updated over a week ago

Rationale

Database operation can sometime fail due to various reason. As a best practice, developers should ensure their code is resilient and handles database exceptions gracefully.

Scope

  • Apex classes and triggers

Did this answer your question?