Updated by Alexander Shishkov about 13 years ago
Error reporting via C++ exception introduced in OpenCV [[OpenCV]] 2.x is really bad idea. Now I just have an access violation when cxcore210.dll (MSVC-compiled) throws an exception, because CRT libs linked into my app and cxcore210.dll are different (for some reasons I have to use /MD for the debug build). Even for the same compiler flags CRT versions can be different and again you'll see the crash... There's general rule: "Don't allow exceptions to propagate across module boundaries". Why not just to follow it? I think it's not very hard: wrap each exported function body with try/catch pair that (optionally) translates C++ exception into the error code.