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 trialDonald Bell
13,863 PointsC# Objects Custom Exceptions Challenge # 2 is not working. Is there a possible bug in this challenge?
C# Objects Custom Exceptions Challenge # 2 is not working. Is there a possible bug in this challenge? It says that it took too long.
3 Answers
Steven Parker
231,248 PointsTaking too long is often a symptom of a loop that never finishes.
If you'd like some help with checking your code, show it here; or even better, make a snapshot of your workspace and post the link to it here.
It would also be helpful to post a link to the course page you are working with.
UPDATE: I don't know why this causes it to time out, but it looks like you just forgot to include the "public" access specifier on your constructor.
And for future issues, when posting code, use the instructions for code formatting in the Markdown Cheatsheet pop-up below the "Add an Answer" area. Or watch this video on code formatting.
Donald Bell
13,863 Pointshttps://teamtreehouse.com/library/c-objects/inheritance/custom-exceptions-2
namespace Treehouse.CodeChallenges { class TooBigException : System.Exception { TooBigException(string message) : base(message) {
}
}
}
Donald Bell
13,863 PointsThere is no infinite loop involved in this code challenge.
Steven Parker
231,248 PointsI agree, this time it's not a loop. And I updated my answer.
Donald Bell
13,863 PointsI got it. I was missing a public access modifier.