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?
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.
Madelyn
2 days agoSusana
8 days agoLeonardo
13 days agoLaquita
18 days agoCarlee
23 days agoMicheline
28 days agoFausto
1 month agoEmily
1 month agoDino
1 month agoEliseo
2 months agoRose
2 months ago