How to catch extern Memory Exception?
BlitzMax Forums/BlitzMax Programming/How to catch extern Memory Exception?
| ||
Hi. Is there a way to catch extern "Unhandled Memory Exception Error" in my case a few models is crashin assimp on Extern Function aiImportFile:Int Ptr( pFile$z,pFlags:Int) End Extern Local pointer:Int ptr = aiImportFile(filename ,readflags) |
| ||
If it is C++ and the library throws an exception, you can wrap it with some proper glue and either handle it yourself in some way or throw a BlitzMax exception. |
| ||
Thanks Brucey, but I'm using the plain C interface of the lib, and I don't want to make C or C++ code, only BlitzMax code. The lib obviously needs some fixing so it doesn't crash, but until then, I'm looking for a solution. It seems it's only one model format that makes it crash, so I'll disallow that for now. But maybe I could call the extern in a thread and have only that crash... |