Valid PDI Dumps shared by ExamDiscuss.com for Helping Passing PDI Exam! ExamDiscuss.com now offer the newest PDI exam dumps, the ExamDiscuss.com PDI exam questions have been updated and answers have been corrected get the newest ExamDiscuss.com PDI dumps with Test Engine here:
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?
Correct Answer: A,B
* Throwing Exceptions in Apex: * throw new ExceptionType();creates a new instance and throws it. * A: No argument constructor. * B: Constructor with a custom error message. * Why Not Other Options? * C and D: These create exception instances but do not throw them, which is not valid syntax for firing an exception. References:Apex Exception Handling:https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm