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 trial

C# C# Objects Inheritance Catching Exceptions

I'm totally lost with this quiz. What is System.index and why isn't it explained in the video, but appears in the quiz?

There are also other questions in the quiz that asked throw exceptions that don't have a specific catch clause in the example code. When selecting the exception won't be caught, it says the answer was incorrect. Can anybody explain this? This course feels like it has some many holes when it comes to introducing exceptions.

1 Answer

Steven Parker
Steven Parker
231,275 Points

I think you're referring to "System.IndexOutOfRangeException", and it's not necessary to be familiar with that specific exception as long as you notice that its a "System" class exception. That's the important fact that allows you to choose the correct answer.

And while several questions don't have a specific catch clause in the example, some do have a generic catch clause for the exception class. So those will still be caught by the generic catch.