Throwing exceptions from a DLL

shilpa24

New member
Joined
Sep 13, 2011
Messages
1
Programming Experience
1-3
I have a application in which dll of another project added,


In my dll's I have several exceptions defined, and when specific errors occur
I throw these exceptions with the assumption that the main application will catch and handle them if the DLL does not.

but when any specific error occurs in dll main application cant able to catch it and whole aplication get closed.
i have added an snapshot which appears when any error appears in dll

how do i handle the exception raise in dll from main project
 

Attachments

  • error.png
    error.png
    72.8 KB · Views: 19
Catching exceptions is done using the Try-Catch statements. If unhandled it goes to the applications UnhandledException event. Whenever and wherever you catch an exception you have to consider the implications of handling it, it may not be viable to keep the application running at this state.
 
Back
Top