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 trialSean Layton
1,722 PointsWhat if there are more then one error you raised and how do you get the reference from the others error you have raised
When getting the reference to the error message he raised, he uses as .err and .format err to get the reference. but what if you have multiple error messages that you raised then how would you get the reference from there?
3 Answers
Steven Parker
231,275 PointsAs soon as an error is raised, the program flow immediately moves to the corresponding "except" statement, so it's not possible to raise another one before the except block begins.
Sean Layton
1,722 PointsOk thanks so you only can raise one error in a try block?
Steven Parker
231,275 PointsThe block might cover several possible raises, but the first one that occurs diverts the program flow immediately.
Sean Layton
1,722 Pointsk thanks