Exception type changed in exec() method of Calculator class