You said the code is being called only if PLATFORM_EXCEPTIONS_DISABLED is 0. This is incorrect. Just compile that function and set the breakpoints if you cannot figure out the #if/#else logic.
It's getting hit because you're running on Windows/Mac and Windows/Mac specific methods are calling it. In platform generic code like OutputDevices.cpp you see this:
I see. You are saying that because a library/framework is not calling one of its own functions in a certain configuration nobody ever going to call this function in that configuration, right? I am not sure I can join you in this belief, after all there are not that many fully recursive libraries so some functions will never be called in almost every library.
"You are saying that because a library/framework is not calling one of its own functions in a certain configuration nobody ever going to call this function in that configuration, right?"
I'm not saying that at all, I said early on that this is a problem. Refer to this in my first comment replying to you: "I don't think RaiseException is well defined. If it's only meant to be used for x86, it should be coded that way instead of relying on other code to enforce the behavior."
Internally it seems they only intended it to be used in specific cases, but there's nothing preventing anyone else from calling it when they shouldn't as you noted. This is bad design.