I'm encountering a very strange issue while debugging a unit test. If I debug the unit test (ctrl+r ctrl+t) I am getting an uncaught exception. If I just run the unit test (ctrl+r t) I do not get this exception.
The uncaught exception is a NHibernate.ByteCode.ProxyFactoryFactoryNotConfiguredException.
Stack trace:
at NHibernate.Bytecode.AbstractBytecodeProvider.get_ProxyFactoryFactory() in d:\CSharp\NH\NH\nhibernate\src\NHibernate\Bytecode\AbstractBytecodeProvider.cs:line 32
at NHibernate.Validator.Util.NHibernateHelper.IsProxyFactoryConfigurated()
I used .Net Reflector to look at the assembly that defines this method (NHibernate.Validator ... it's open source) and here is the method that "throws" the exception:
public static bool IsProxyFactoryConfigurated()
{
try
{
IProxyFactoryFactory proxyFactoryFactory = Environment.BytecodeProvider.ProxyFactoryFactory;
return true;
}
catch (ProxyFactoryFactoryNotConfiguredException)
{
return false;
}
}
How can this exception not be caught by that Try Catch block?
C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...
Compared to other languages—like Java, PHP, or C#—C is a relatively simple language to learn for anyone just starting to learn computer programming because of its limited number of keywords.
In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.
It sounds like you're seeing a first chance exception.
Do you have "Break on first-chance exceptions" enabled? You should be able to configure it in the Debug->Exceptions menu.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With