Activity Forums Salesforce® Discussions How do I throw an exception in Salesforce?

  • Ayush

    Member
    June 3, 2020 at 12:28 pm

    You have to create your own Exception class .

  • Marziya

    Member
    June 3, 2020 at 12:57 pm

    To create your custom exception class, extend the built-in Exception class and make sure your class name ends with the word Exception , such as “MyException” or “PurchaseException”. All exception classes extend the system-defined base class Exception , and therefore, inherits all common Exception methods

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos