nerdexam
Microsoft

98-361 · Question #85

The throw keyword is used to perform which two actions? (Choose two.)

The correct answer is C. raise exceptions D. re-throw exceptions as a different type. The Throw statement throws an exception that you can handle with structured exception- handling code (Try...Catch...Finally) or unstructured exception-handling code (On Error GoTo). You can use the Throw statement to trap errors within your code because Visual Basic moves up the

Understanding Core Programming

Question

The throw keyword is used to perform which two actions? (Choose two.)

Options

  • Astop processing of the code
  • Bmove error handling to a separate thread
  • Craise exceptions
  • Dre-throw exceptions as a different type

How the community answered

(21 responses)
  • A
    14% (3)
  • B
    10% (2)
  • C
    76% (16)

Explanation

  • The Throw statement throws an exception that you can handle with structured exception- handling code (Try...Catch...Finally) or unstructured exception-handling code (On Error GoTo). You can use the Throw statement to trap errors within your code because Visual Basic moves up the call stack until it finds the appropriate exception-handling code. * This example throws an ApplicationException exception. Throw New ApplicationException

Topics

#throw keyword#exception handling#re-throw#error propagation

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice