PrepAway - Latest Free Exam Questions & Answers

Which exception type should be checked for when catching exceptions thrown when governor limits are exceeded?

Which exception type should be checked for when catching exceptions thrown when governor
limits are exceeded?

PrepAway - Latest Free Exam Questions & Answers

A.
StackOverflowException

B.
LimitException

C.
GovernorException

D.
PlatformLimitException

E.
InvalidLimitException

F.
None of these

3 Comments on “Which exception type should be checked for when catching exceptions thrown when governor limits are exceeded?

  1. Z2 says:

    Some special types of built-in exceptions can’t be caught.
    Those exceptions are associated with critical situations in the Force.com platform. These situations require the abortion of code execution and don’t allow for execution to resume through exception handling. One such exception is the limit exception (System.LimitException) that the runtime throws if a governor limit has been exceeded, such as when the maximum number of SOQL queries issued has been exceeded. Other examples are exceptions thrown when assertion statements fail (through System.assert methods) or license exceptions.

    When exceptions are uncatchable, catch blocks, as well as finally blocks if any, aren’t executed.

    https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_exception_statements.htm?search_text=limit%20exception




    0



    0

Leave a Reply