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
pp11222pp11222 

Exception Handling in a global class which can be consumed by VF page or other apex classes

how to do the exception handling in a global void  apex class, which can be consumed by VF page or other apex classes.

 

I have some global void apex classes which were created in a manged release packages and now I cannot change their signatures or return value. These classes are called from VF pages and are also avaiable for other customers so that can use them in their custom code. but they do not have proper exception handling.

 

I want to know how can I trap the exceptions (DML Exceptions) in other classes or VF Pages.

 

Please provide some sample code.

 

Thanks