Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 5,953 | Comments: 44,408

filter by tags archive

RantWho thought THIS was a good idea?!


image

I means, seriously!

Even this is better:

More posts in "Rant" series:

  1. (20 Jul 2012) SignalR, Crazyiness, Head Butting & Wall Crashing
  2. (08 Sep 2011) Who thought THIS was a good idea?!
  3. (19 Oct 2009) Compilers != Parsers
  4. (05 Dec 2006) CSC Is Stupid

Comments

Pablo Alarcón

Looks like someone used the resource file key instead of the value ;)

Bryan Porter

Could be worse. The Secure Store Service API in SharePoint 2010 likes to throw exceptions that are declared internal.

tobi

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.

justin chase

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.

Ayende Rahien

Justin, It could show me the exceptions that it had internally. In 99% of the cases, it only have a single exception, anyway

justin chase

Click the "View Detail" link and it will show you the exceptions it has aggregated.

Ayende Rahien

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.

justin chase

Your error logger would have to special case AggregateExceptions, that is a pain in the ass that's true.

Ayende Rahien

Justin, I would state that if your class need special handling, separate from all other classes of the same type, your class is broken

justin chase

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.

Ayende Rahien

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

Comments have been closed on this topic.

FUTURE POSTS

No future posts left, oh my!

RECENT SERIES

  1. The RavenDB Comic Strip (3):
    28 May 2015 - Part III – High availability & sleeping soundly
  2. Special Offer (2):
    27 May 2015 - 29% discount for all our products
  3. RavenDB Sharding (3):
    22 May 2015 - Adding a new shard to an existing cluster, splitting the shard
  4. Challenge (45):
    28 Apr 2015 - What is the meaning of this change?
  5. Interview question (2):
    30 Mar 2015 - fix the index
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats