Add tests of exception and undefined cases.