I also think, error is the right way, as it is undefined behaviour.