Added a couple of exceptions for programmer errors.