RantWho thought THIS was a good idea?!
time to read 1 min | 35 words
More posts in "Rant" series:
- (20 Jul 2012) SignalR, Crazyiness, Head Butting & Wall Crashing
- (08 Sep 2011) Who thought THIS was a good idea?!
- (19 Oct 2009) Compilers != Parsers
- (05 Dec 2006) CSC Is Stupid
Comments
Looks like someone used the resource file key instead of the value ;)
Could be worse. The Secure Store Service API in SharePoint 2010 likes to throw exceptions that are declared internal.
Well at least it allows you to programmatically determine what the exact cause was ;-)
Curiously this is not the case for most exceptions. Especially IOException gives you about nothing to which you can react programmatically. There are not error codes.
It's an aggregate exception, which couldn't have a useful message anyway. You have to go look into the exceptions that it has aggregated to get the useful messages. It's a property, just expand it.
Justin, It could show me the exceptions that it had internally. In 99% of the cases, it only have a single exception, anyway
Click the "View Detail" link and it will show you the exceptions it has aggregated.
Justin, That assumes that I actually have the debugger there. And that is is responding. What about log messages, users errors, emails to the mailing list, all of which show that error.
Your error logger would have to special case AggregateExceptions, that is a pain in the ass that's true.
Justin, I would state that if your class need special handling, separate from all other classes of the same type, your class is broken
Ayende, It seems like .ToString() will print out all of the aggregated exceptions still, so it should work with loggers fine (unless you have some type of custom formatter that does more than just ToString()'s the exception). It's only in the debugger that you'll see this issue. The message should say "One or more errors occurred." Which is sort of redundant considering the name of the Exception.
Justin, Users see that all the time, that is the error that is thrown in VS. To find the real details, you have to dig deep, that isn't a nice thing to do to people
Comment preview