Added an exception for empty string errors.