Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anilsomasundaran/541cc6475b55eecd0ee5a6eede0321e3 to your computer and use it in GitHub Desktop.
Save anilsomasundaran/541cc6475b55eecd0ee5a6eede0321e3 to your computer and use it in GitHub Desktop.
TestApexController.apexc
public class TestApexController {
@AuraEnabled
public static String callApexControllerMethod ( String message, Boolean showError ) {
String counterMessage = 'Response from apex controller - ' + 'Your Message : ' + message;
if (showError) {
throw new AuraHandledException('Custom Exception from the apex controller');
}
return counterMessage;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment