LimitExceptioncannot be caught in atry-catchblock because it is thrown when governor limits are exceeded, and Salesforce does not allow further processing in such cases.
Other exceptions, such as custom exceptions,NoAccessException, orCalloutException, can be caught and handled.
Exceptions in Apex
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit