function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
forcedev99forcedev99 

Test method for code within Catch Block

Anyone please give me some idea about how to execute code present within Catch block as part of test method.

Thanks a lot !!!

 

 

tmatthiesentmatthiesen

In the test method you simply need to force the exception.  Since you are catching it, you can simple assert the behavior.