Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a vb.net project, which is generating dll, and it is built in VS2008. It has a function, and in that function there is

Throw New NotImplementedException()

it is some what like

Public Sub Function()
Dim strFunctionName As String = "some string"
myLogger.LogMessage(LoggerBuilder.INSIDE_FN, strFunctionName,LogLevel.DebugMessage)
....
Throw New NotImplementedException()
End Sub


in VS2008 it is not throwing any error.


But the code has been migrated to VS2010. After migrating the code to VS2010, it is throwing the NotImplementedException(). Didn't have a clue why this is happening.

Request anybody could please throw light on this

What I have tried:

since this project is constituting a dll, i registered this dll by targeting to framework 4.0 like,

at the command prompt window

path=%path%;c:\Windows\Microsoft.NET\Framework\v4.0.30319

later registered the dll using regasm. Ran the application and tried to debug the code, at which got the NotImplementedException error
Posted
Updated 24-Apr-18 4:03am

1 solution

If the code includes a Throw of a NotImplementedException and the code executes it, then unless the code that calls the method containing that code includes a Try...Catch block, then the exception will cause your app to crash, or in the debugger, stop.

But ... there is another way the debugger can catch Handled exceptions, which may account for the difference between VS2008, and VS2010. Go to the Debug menu, and select the "Exceptions..." option.
In the resulting dialog, untick the "Thrown" column", and tick the "User-unhandled" column instead. The debugger will now ignore handled exceptions.
 
Share this answer
 
Comments
sreehari_mysore 25-Apr-18 5:14am    
Yes... the "Thrown" column is unchecked, and "User-unhandled" column is checked. But still the issue didn't get resolved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900