This type of exception is not commonly used. Instead, it exists only so that you can recognize it. If the tester or user has sent you a crash report that mentions bad_typeid
you, you will know what error to look for when starting debugging.
You really shouldn't throw this exception yourself, and I don't think you even wanted to catch it. In the end, what could you do to eliminate the root cause of this error in your program? The way to recover from this type of exception is to find the error, fix it, recompile and distribute the updated version of your program, which does not try to use the operator typeid
for invalid values.
source
share