After further testing, I have found that there is a problem with current mingw 32 toolchain, exception handling does not work as expected (and it is not theirs fault, but mine, caused by replacing ld.exe).
mingw 64 seems to work though... So if you were using MINGW, try switching to MINGWx64.