TemplateApexException Apex Examples

Use the TemplateApexException class to handle errors cleanly and provide clear information to template users.

Throwing an exception fails the configuration wizard. You can also create variables to track errors and report them to the user in the wizard without failing.