You're not returning the error. The statement isn't doing anything right now.

That said, this should still panic. There's no reason not to panic from C++ when the code has found a deal-breaker situation.