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! While you're at it, check out some resources Treehouse students have shared here.
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 trialAshwin Kumar
680 PointsWhat else is try statement used for? Is it only for exception handling?
i want to know if there is any other usage for the try statement apart from handling exceptions. Can it be used for other scenarios? If yes, what might they be?
2 Answers
Jan Oberreiter
78,020 Pointstry lets you test a block of code for errors. As far as I know, there is no other usage for other scenarios ...
Ar33ss Leon
4,621 PointsJust only for handling errors