Font size
WorksheetsSalesforce Exception Handling Quiz
Total questions: 10
Worksheet time: 2mins
Best Practices for Exception Handling in Apex
Never just catch Exception
Exceptions in Apex should be handled carefully
Use the System.SavePoint() and Database.rollback() functions
All of the Above
Exception handlers are declared with ____________ keyword.
Catch
Try
throw
finally
What keyword is used to explicitly raise a exception?
catch
throw
throws
raise
Choose Standard Apex Exception Types (Select Any Two)
LimitException
ReportException
MyApexClassException
QueryException
Reasons that cause an exception :
The developer is trying to write wrong syntax
The developer is trying to reference a null object
The developer is not added try catch block in code
The developer is performing some DML and it fails
Which of these keywords is not a part of exception handling?
try
finally
thrown
catch
What Causes Exceptions?
DmlException
QueryException
NullPointerException
All of the Above
The code within the ----------- block will always be executed whether or not an exception is thrown
try
catch
finally
throw
What has happened during the fault, “UNKNOWN_EXCEPTION”?
The system has encountered a breach
The system has encountered an internal error
The system has encountered a hardware issue
The system has encountered data loss
When this Exception occurs : List index out of bounds: 0?
ArithmeticException
System.ListException
IllegalArgumentException
ArrayStoreException
