Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Salesforce Exam Platform Developer I Topic 2 Question 111 Discussion

Actual exam question for Salesforce's Platform Developer I exam
Question #: 111
Topic #: 2
[All Platform Developer I Questions]

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?

Show Suggested Answer Hide Answer
Suggested Answer: A, B

Contribute your Thoughts:

Dorothy
1 months ago
Haha, C and D are like trying to light a match by just holding it. Gotta throw that exception!
upvoted 0 times
Karl
8 days ago
A) throw new ParityException ();
upvoted 0 times
...
...
Darci
2 months ago
I agree with Elfriede and Benton. A and B are the right options here.
upvoted 0 times
Gianna
28 days ago
Yes, A and B are the correct options for firing the custom exception.
upvoted 0 times
...
Luann
1 months ago
I agree, B is also a valid way to throw the custom exception.
upvoted 0 times
...
Major
1 months ago
I think A is the correct way to fire the custom exception.
upvoted 0 times
...
...
Erick
2 months ago
I'm not sure, but I think the answer could also be B) throw new parityException('parity does not match').
upvoted 0 times
...
Benton
2 months ago
Definitely A and B. You need to use the 'throw' keyword to actually raise the exception.
upvoted 0 times
...
Adelaide
2 months ago
I agree with Patti, because throwing the exception is the correct way to handle errors.
upvoted 0 times
...
Elfriede
2 months ago
A and B are the correct ways to fire the custom exception. C and D don't actually throw the exception.
upvoted 0 times
Jade
17 days ago
D) new ParityException('parity does not match');
upvoted 0 times
...
Wilbert
28 days ago
C) new ParityException ();
upvoted 0 times
...
Frederick
1 months ago
B) throw new parityException ('parity does not match');
upvoted 0 times
...
Deja
2 months ago
A) throw new ParityException ();
upvoted 0 times
...
...
Patti
2 months ago
I think the answer is A) throw new ParityException();
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77