Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » How to catch a dll exception
How to catch a dll exception [message #28925] Mon, 27 September 2010 16:50 Go to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello all

Running a dll I get this exception:

EXCEPTION_FLT_INVALID_OPERATION

Is it a way to catch these exceptions properly?

I have tried with __try __finally but it does not serve.


Best regards
Iñaki
Re: How to catch a dll exception [message #28926 is a reply to message #28925] Mon, 27 September 2010 18:35 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
Hi koldo,

did you try with the C++ try....catch ?

Max
Re: How to catch a dll exception [message #28929 is a reply to message #28926] Mon, 27 September 2010 23:06 Go to previous messageGo to next message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Massimo

It seems C++ exceptions and Win32 and hardware exceptions are not the same.

Now I am reading about SEH exceptions ("Structured Exception Handling").


Best regards
Iñaki
Re: How to catch a dll exception [message #28934 is a reply to message #28929] Tue, 28 September 2010 11:29 Go to previous messageGo to next message
mdelfede is currently offline  mdelfede
Messages: 1307
Registered: September 2007
Ultimate Contributor
SEH should be for C exception, try...catch for c++ ones, and (IIRC) they're not very compatible.
If your DLL throws c++ exception, they should be caught with try... catch construct; if it's a c dll, it should work with SEH.

If both don't work, I'm out of ideas Smile

Ciao

Max
Re: How to catch a dll exception [message #28939 is a reply to message #28934] Tue, 28 September 2010 15:41 Go to previous message
koldo is currently offline  koldo
Messages: 3356
Registered: August 2008
Senior Veteran
Hello Massimo

Here there is an example and some info about SEH exceptions, some using _set_se_translator() and /EHa compiler flag.

Example
http://www.gamedev.net/community/forums/topic.asp?topic_id=5 13190

Docs
http://blogs.msdn.com/b/jaredpar/archive/2008/01/11/mixing-s eh-and-c-exceptions.aspx
http://www.gamedev.net/reference/articles/article2488.asp
http://msdn.microsoft.com/en-us/library/9xtt5hxz%28VS.80%29. aspx

Perhaps my .dll is very strange, so _set_se_translator() catch the .dll exception indeed, but it cannot clean it so after that the exception reappears ending the program.


Best regards
Iñaki
Previous Topic: [Fixed!] ScanUuid returns wrong value
Next Topic: Handle a RGBA* with ImageBuffer
Goto Forum:
  


Current Time: Sat Apr 20 05:41:04 CEST 2024

Total time taken to generate the page: 0.09698 seconds