Added an IllegalArgumentException catch clause.