Exception Errors Flashcards
AsyncException
Any problem with an asynchronous operation, such as failing to enqueue an asynchronous call.
BigObjectException
Any problem with big object records, such as connection timeouts during attempts to access or insert big object records.
CalloutException
Any problem with a Web service operation, such as failing to make a callout to an external system.
DmlException
Any problem with a DML statement, such as an insert statement missing a required field on a record.
EmailException
Any problem with email, such as failure to deliver. For more information, see Outbound Email.
ExternalObjectException
Any problem with external object records, such as connection timeouts during attempts to access the data that’s stored on external systems.
IllegalArgumentException
An illegal argument was provided to a method call. For example, a method that requires a non-null argument throws this exception if a null value is passed into the method.
InvalidParameterValueException
An invalid parameter was supplied for a method or any problem with a URL used with Visualforce pages. For more information on Visualforce, see the Visualforce Developer’s Guide.
LimitException
A governor limit has been exceeded. This exception can’t be caught.
JSONException
Any problem with JSON serialization and deserialization operations. For more information, see the methods of System.JSON, System.JSONParser, and System.JSONGenerator.
ListException
Any problem with a list, such as attempting to access an index that is out of bounds.
MathException
Any problem with a mathematical operation, such as dividing by zero.
NoAccessException
Any problem with unauthorized access, such as trying to access an sObject that the current user does not have access to. This exception is used with Visualforce pages. For more information on Visualforce, see the Visualforce Developer’s Guide.
NoDataFoundException
Any problem with data that does not exist, such as trying to access an sObject that has been deleted. This exception is used with Visualforce pages. For more information on Visualforce, see the Visualforce Developer’s Guide.
NoSuchElementException
This exception is thrown if you try to access items that are outside the bounds of a list. This exception is used by the Iterator next method. For example, if iterator.hasNext() == false and you call iterator.next(), this exception is thrown. This exception is also used by the Apex Flex Queue methods and is thrown if you attempt to access a job at an invalid position in the flex queue.