Exception inside dll
-
Hi here the Execute method is crashing...... Here my problem is that my application is not able to catch that exception.( those exceptions occurs inside the dll)
My small attempt...
-
Hi here the Execute method is crashing...... Here my problem is that my application is not able to catch that exception.( those exceptions occurs inside the dll)
My small attempt...
-
Because you've swallowed the exception (and logged it according to your comments) rather than rethrowing it.
try
{
// whatever
}
catch(Exception ex)
{
// log exception
throw;
}now the calling application will receive the exception.
There may be some mistake in my question .let me explain it once more.... <pre> try { // This function is inside the DLL Function(); } catch ( Exception ex ) { // Log exception } //Inside the DLL public void Function() { // something which is crashing....... } what i am saying is i am not getting the exception which is occuring inside the dll....
My small attempt...
-
There may be some mistake in my question .let me explain it once more.... <pre> try { // This function is inside the DLL Function(); } catch ( Exception ex ) { // Log exception } //Inside the DLL public void Function() { // something which is crashing....... } what i am saying is i am not getting the exception which is occuring inside the dll....
My small attempt...
-
stancrm wrote:
from my experience, in that row, the dll create a new thread, and the new thread throw an exception.
There is no new thread created in that code.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Please come to my question............. ]if i put try catch inside the dll , that will catch the exception
My small attempt...
-
stancrm wrote:
from my experience, in that row, the dll create a new thread, and the new thread throw an exception.
There is no new thread created in that code.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Please come to my question............. ]if i put try catch inside the dll , that will catch the exception
My small attempt...
-
For what????? Hi all please understand my question.............. 1. I am calling a method from an application ( example APP) ,which is inside a dll( example DLL) 2. Just assume that that method is crashing( in side DLL) 3. I want to catch the exception in the calling application( APP)( the application from which i called the dll method) ---------------------------------------------------------------------
My small attempt...
-
For what????? Hi all please understand my question.............. 1. I am calling a method from an application ( example APP) ,which is inside a dll( example DLL) 2. Just assume that that method is crashing( in side DLL) 3. I want to catch the exception in the calling application( APP)( the application from which i called the dll method) ---------------------------------------------------------------------
My small attempt...
-
"if you cannot catch the exception from method Execute, that means there is something wrong in the method." please try to understand that i dont want to find the root cause or reason for the exception... i want to catch the exception in the c# application which calls the DLL............. Please imagine that i put some code which generates exception.I dont want to debug and find the reason i just want to catch it on my application...
My small attempt...
-
I don't have to...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008