Switched from illegal parameter exception to illegal argument exception.