nerdexam
Salesforce

CRT-450 · Question #237

When the code executes, a DML exception is thrown. How should a developer modify the code to ensure exceptions are handled gracefully?

The correct answer is C. Implement a try/catch block for the DML. See the full explanation below for the reasoning.

Question

When the code executes, a DML exception is thrown. How should a developer modify the code to ensure exceptions are handled gracefully?

Exhibit

CRT-450 question #237 exhibit

Options

  • AImplement the upsert DML statement.
  • BImplement Change Data Capture.
  • CImplement a try/catch block for the DML.
  • DRemove null items from the list of Accounts.

How the community answered

(37 responses)
  • A
    14% (5)
  • B
    5% (2)
  • C
    78% (29)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full CRT-450 Practice