Thanks for support, I found on another forum that this happens only when running from IDE. Running compiled application is fine.
Makes sense, as the debugger displays raised exceptions before the app even sees them. Just continue execution and the debugger will pass the exception to the app for normal handling.