Implementing missing exception throws leading to undefined behaviour (no return)