Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Jacob LeatherwoodCourses Plus Student 467 Points
there is no try errors...
I am getting a ton of errors based on what I did in the 'throw new IllegalArgumentException' section. Can you review my code to see where I went wrong?
Unsubscribed User427 Points
You used a System.out.println(""); for a formatted string, you can't do that. Check this link to understand more about that better : https://teamtreehouse.com/community/difference-between-systemoutprintf-and-systemoutprintln.
To correct your code : (Lines 40 to 41 in Example.java)
System.out.printf("The error was %s", iae.getMessage());
What did I do ? I change the method to System.out.printf(""); and I had a %s to display the error.