070-565 Free Dumps Study Materials
Question 8: You create applications by using Microsoft Visual Studio .NET 2008 and the .NET Framework 3.5.
You deploy a new Windows Forms application in a test environment. During the test process, an error
message that includes an incomplete stack trace is reported.
You review the following code segment that has caused the error.
Public Function AddNewMission(ByVal missiondate As DateTime, _
ByVal mission As String, ByVal missionLink As String) As Integer
Dim pgr As DALCode = New DALCode("cnWeb")
Try
Dim retcode As Int16 = _
pgr.AddNewMission(missiondate, mission, missionLink)
Return retcode
Catch ex As Exception
Throw New Exception(ex.Message.ToString())
Finally
pgr.Dispose()
End Try
End Function
You need to modify the code segment to display the entire stack trace.
What should you do?
A. Remove the CATCH block.
B. Remove the FINALLY block.
C. Add a Using block to the TRY block.
D. Replace the THROW statement in the CATCH block with Throw (ex).
Correct Answer: A