The apex:actionFunction has oncomplete handler according to this https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_compref_actionFunction.htm. But I cannot find "onerror" handler in the list, or there are other patterns to handle exceptions from server side?


There's no such thing, because an uncaught exception (e.g. an error) will cause the Visualforce screen of death:

[Visualforce error]

If you want more control over potentially fatal situations, consider using Remoting or actionFunctions instead; you should be able to use a normal try-catch block to catch and handle any exceptions you receive this way.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.