this is the error I’m receiving:

I would like to know this:
- how do set up
try catchblock to handle that error?
OR - how do handle that error before it hapens if
try catchis not possible?
I’m receiving this error when I call a member function trough pointer to member function with wrong signature.
That error of course won’t happen if I call it with correct signature , but, I just wanna know how do I handle it if it happens.
1. You can’t handle that error with
try/catch.This is because
try/catchrelies on the call stack and your error is that your call stack is corrupted.2. There is no reasonable runtime method to know in advance that code is going to corrupt the stack.
These problems are typically handled by using caution when casting (function) pointers in the code itself. The compiler will not allow an incorrect function pointer assignment unless you’re forcing it with a cast.