Single Choice Easy

QYou are to complete the code needed to catch an exception. Which will best complete this statement?

catch (_________________________)

ID: #9402 Module 15: Exception Handling - X++ D365 F&O Technical 224 views
Question Info
#9402Q ID
EasyDifficulty
Module 15: Exception Handling - X++ D365 F&O TechnicalTopic

Choose the Best Option

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

  • A exception::error
  • B error
  • C ttsAbort
  • D _error
Correct Answer

Explanation

Justification:

  1. The system enumeration “exception” is used in the parenthesis after the catch statement to specify which type of exception to catch.
  2. Error is not used to catch an exception, but rather display an error message to the user. It is commonly used after the throw keyword.
  3. ttsAbort is used in the transaction tracking system to stop a transaction roll back the changes to the state before the ttsBegin statement was called. It is not used in catch statements.
  4. The Dialog::Error statement is not valid. The dialog object is not an enumeration and does not contain an error value; therefore, it cannot be used in a catch statement.

 

Related Lesson: Code Statements

Share This Question

Challenge a friend or share with your study group.