Salesforce
CRT-450 · Question #228
A developer creates a custom exception as shown below: public class ParityException extends Exception {} What are two ways the developer can fire the exception in Apex? Choose 2 answers
The correct answer is B. throw new ParityException("parity does not match"); D. throw new ParityException(). See the full explanation below for the reasoning.
Question
A developer creates a custom exception as shown below:
public class ParityException extends Exception {} What are two ways the developer can fire the exception in Apex? Choose 2 answers
Options
- Anew ParityException();:
- Bthrow new ParityException("parity does not match");
- Cnew ParityException('parity does not match');
- Dthrow new ParityException();
How the community answered
(20 responses)- A5% (1)
- B80% (16)
- C15% (3)
Community Discussion
No community discussion yet for this question.