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 6 years 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?