Exception handling for too many inputs