MCQ Single Best Answer Easy

QYou are to complete the code needed to start exception handling. Which will best complete this statement?

____________________ error("Please enter a valid VIN number.");

ID: #9401 Module 15: Exception Handling - X++ D365 F&O Technical 217 views
Question Info
#9401Q 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
  • B catch
  • C throw
  • D info
Correct Answer: Option C

Explanation

Justification:

  1. Exception is not a keyword to be used in conjunction with the error output message. Exception is a system enumeration used to specify the type of exception.
  2. The catch command is used to catch exceptions and uses the system enumeration “exception” to indicate which type of exception is to be expected.
  3. The throw keyword is used to start exception handling. In the example, it is followed by the text value that will be displayed for the error message being thrown.
  4. Info is used to display an informational output value to the end user in an info log, it does initiate error handling.

 

Related Lesson: Code Statements

No Previous Next Question

Share This Question

Challenge a friend or share with your study group.