Thursday, November 02, 2006

Attention Toplink Authors

There are a lot of things I've come to love about Toplink over the years, and by the transitive property I love them in Glassfish. But there's one part of Toplink I absolutely cannot stand: the error messages, or lack thereof.

Consider this one: "Unknown abstract schema type [Foo]" where "Foo" is some class. What does that actually mean? It means Toplink couldn't find a class called Foo defined in persistence.xml. So why couldn't the bastards just SAY that? Why did they have to say "unknown abstract schema type"?

Attention Toplink Authors, or at least those of you who write these fucked-up error messages. I have a little task for you. There's something I want you to do. Ready for it?

Write some fucking decent error messages.

Seriously though, this got me thinking about error messages- what kinds of error messages I find useful and what sort of error messages I hate. Obviously I hate messages like "unknown abstract schema type". Worse still is the *absence* of error messages (aka, the "silent failure") and only slightly better is the NullPointerException (or any other exception with a broad, generic name) with the stack trace.

So what makes a good error message good and a bad error message bad? I have narrowed my scope to four things: Context, Clarity, Detail and Action-ability.

Yeah, it's a little more work for the framework developer, but it makes the framework a lot more usable and developer-friendly.


very true, I was just searching around for some help with toplink errors. They are really bad and do not provide real descriptions that would allow me to figure out whats going on.

Well, said.
right on the money,
I just got the "Unknown abstract schema type" from toplink

Useless unless you google them
Lol, googling brought me to your post , which finally helped me to figure out the problem on the Unknown abstract schema type :)
Well said, I filed a bug report with Eclipselink at
Gili: Thanks for opening the bug report. We'll get this addressed.

Nick: While a bit offensive in approach you do raise a good point and I appreciate the frustration that can be caused from diagnosing an exception message that does not appear to offer much help. Please file a
bug against EclipseLink if you encounter any issues as this is our primary feedback mechanism and allows us to address specific issues much more quickly.

Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]