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
nagamalli tadikondanagamalli tadikonda 

excetptions

what are the errors you faced in apex ?
Amit Chaudhary 8Amit Chaudhary 8
Exception Class and Built-In Exceptions
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm

An Introduction to Exception Handling
https://developer.salesforce.com/page/An_Introduction_to_Exception_Handling

Exceptions in Apex
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_exception_definition.htm


What is an exception?

An exception is a special condition that changes the normal flow of program execution. That is, it's when something bad happens that the program can't deal with during execution. Exceptions are the language's way of throwing up its hands and saying, "I can't deal with this, you need to."
So what kinds of conditions can cause Apex to raise, or throw, an exception? Here are the most common examples:
  • Your code expects a value from something that is currently null
  • An insert or update statement fails to pass a custom validation rule you have set
  • Assigning a query that returns no records or more than one record to a singleton sObject variable
  • Accessing a list index that is out of bounds

different kinds of exceptions
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_exception_methods.htm


Let us know if this will help you