Single Choice Easy

QAn error is sometimes thrown in a certain try…catch block. You know that the issue can be fixed within the code during the error handling code block. What statement could you use when the error is found to run the code again?

ID: #12156 Exception Handling in D365 F&O X++ 201 views
Question Info
#12156Q ID
EasyDifficulty
Exception Handling in D365 F&O X++Topic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A The throw statement should be used in the catch statement to rerun the try block.
  • B The finally statement should be used in the catch statement to rerun the try block.
  • C The retry statement could be used in the catch statement to rerun the try block.
  • D A business system function should be used in the catch statement to rerun the try block.
Correct Answer

Explanation

  • A. Incorrect: A throw statement does not rerun the try block when an error is found.
  • B. Incorrect: The finally statement runs code regardless of how the try block is exited. It does not try to rerun the try block.
  • C. Correct: The retry statement will rerun the try block to give the code another opportunity to succeed.
  • D. Incorrect: A business system function is used to calculate or enter financial data. It is not used for error handling.

Share This Question

Challenge a friend or share with your study group.