Home » Microsoft » MB6-704 » Which type of exception should you handle?
You are developing a solution by using X++. The solution updates multiple records.
You need to ensure that if the solution attempts to modify records that currently are being edited by a user, the operation will be retried.
Which type of exception should you handle?
A. Code Access Security
B. Sequence
C. Update Conflict
D. Deadlock
Correct Answer: C
Explanation/Reference:
Update Conflicts
OCC makes it possible for other processes to update a record even after it has been fetched. You can catch update conflicts by catching the UpdateConflict and UpdateConflictNotRecovered exceptions.
Exception: UpdateConflict
Indicates that an error has occurred in a transaction that is using Optimistic Concurrency Control. The transaction can be retried (use a retry statement in the catch block).
Incorrect:
Not D:
Exception Deadlock:
Indicates that there is a database deadlock because several transactions are waiting for each other.
Reference: Optimistic Concurrency Control [AX 2012]; Exception Handling with try and catch Keywords [AX 2012]